maartenba/DotNetWatch

Unable to use hotreload with --framework flag in command line

GiampaoloGabba opened this issue · 1 comments

Hello,
when using this plugin, the hotreload functionality for aspnetcore and blazor is not working.
Using the verbose flag i see this:
Did not find a HotReloadProfile or running a non-default command. Watching with legacy behavior.

If i launch dotnet watch manually from my terminal, everything works fine.

I noticed that adding the --framework flag breaks the hot-reload functionality in dotnet watch.

So if i try:
"C:\Program Files\dotnet\dotnet.exe" watch run --project D:/Test/Test.csproj --framework net6.0

hotreload doest not work, but with:

"C:\Program Files\dotnet\dotnet.exe" watch run --project D:/Test/Test.csproj

it works!

Maybe you can change the settings to add the --framework flag only if the user opts in, and remove it from default behaviour (so dotnet watch will take the default configured for the project).

Fresh version uploaded, will be available in Rider soon.