-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Description
Is your feature request related to a problem? Please describe.
I want my app to do all the compilation in watch mode, when either user start the project from Visual Studio using F5, or from CLI using dotnet watch run
.
I don't want to invoke multiple processes from CLI like:
Start-Job { dotnet watch run }; # watch C# changes
Start-Job { dotnet watch /t:YarnBuild }; # watch javascript changes
I have read quite some MS Build and .NET docs recently, but I'm missing more detailed info on how dotnet watch (run/build) works with msbuild.
For example:
-
how to start custom watch process when when
dotnet watch run
is invoked, simmilar to Microsoft.TypeScript.MSBuild.For example, I have SASS compiler cli `` or custom dotnet tool, that supports watch mode, and I would like it to run together with my
dotnet watch run
process, so that my SASS files are being compiled incrementally. -
how to invoke specific msbuild target when
dotnet watch run
first builds the project, but not when it does hot reload in watch mode
Additional context
It has been asked couple of times, e.g.:
https://stackoverflow.com/questions/51824979/defining-command-to-be-run-with-dotnet-watch
It's also a missing part of otherwise nice Microsoft.AspNetCore.ClientAssets
package, see
https://devblogs.microsoft.com/dotnet/build-client-web-assets-for-your-razor-class-library/#comment-14441