Abolute path in dotnet watch run command doesn't work
You can resolve this by specifying the -p
(or the longer --project
) option on the watch
command rather than on the run
command. In your case, that would be:
dotnet watch -p C:\foo\bar\Project\Project.csproj run
There's a note in the docs that covers this:
You can use
dotnet watch --project <PROJECT>
to specify a project to watch. For example, runningdotnet watch --project WebApp
run from the root of the sample app will also run and watch the WebApp project.