Dotnet Clock with Visual Studio Debug Code

right now my computer is very slow and Visual Studio is very poor, so I decided to try Visual Studio Code to create my ASP.NET Core app. In one of Microsoft's presentations, I saw an ASP.NET Core app with a tool called dotnet watch. This tool will recompile the code after some mild changes (eg in Visual Studio).

So my quesiton:

  • Do I even need to recompile the code in flight into Visual Studio Code after a slight change in debug mode?
  • Is there a way to make the task recompile just one project? My whole solution has many projects and collecting data every time is just a bad idea.

After I try Debug app with dotnet clock, dotnet network crash :(

Thanks for the help:)

+3


source to share


1 answer


VS Code : The Visual Studio Code Debugger does not support Edit and Continue. This feature has been requested (see https://github.com/OmniSharp/omnisharp-vscode/issues/490 ) however there are currently no plans to implement this in VS Code.

dotnet-watch : If you want to limit which clock the dotnet-watch is, you can change ProjectReference

yours in your * .csproj file.

<ProjectReference Include="..\Other\other.csproj" Watch="false" />

      



This ensures that dotnet-watch only restarts the build on files from the current project, not files in the project it references.

However, it will not prevent MSBuild from being recompiled ProjectReference

when creating a new assembly. MSBuild will always try to recompile all ProjectReference

s, but recompiling should be quick if you haven't changed the files. MSBuild uses caching to avoid having to call the C # compiler again if needed.

For details on setting dotnet clocks in * .csproj files see https://github.com/aspnet/DotNetTools/tree/rel/2.0.0-preview2/src/Microsoft.DotNet.Watcher.Tools#msbuild .

+4


source







All Articles