microsoft / vscode-dotnettools

This is a feedback repository to capture issues logged for the C# Dev Kit and related extensions from Visual Studio Code
Other
228 stars 12 forks source link

[BUG] Hot Reload not working .net 8 for .razor files #724

Open mprattinger opened 11 months ago

mprattinger commented 11 months ago

Describe the Issue

I am using and .net blazor server app updated to .net 8 on mac in vscode. The hot reload symbol is showing in the debug bar, in the hot reload console it writes:

💡 Possible changes were found.

but when i save and press the hot reload button nothing happens.

I saw the same behavior on windows and on mac.

r Michael

Steps To Reproduce

.net 8 mac -> dotnet new blazorserver vs code with c# dev kit F5 to start debug change something on Index.razor

Expected Behavior

The changes made in the page should show in the browser

Environment Information

macOS vs code 1.84.2 c# dev kit v1.0.14

WardenGnaw commented 11 months ago

This is a known limitation, our docs are currently updating but it should appear at https://code.visualstudio.com/docs/csharp/debugging#hot-reload

image

mprattinger commented 11 months ago

oh,

thanks for the answer, havn't seen this before

hopefully this will be availiable soon

isadorasophia commented 11 months ago

Routing this to Roslyn. It's currently not supported, but we should investigate further why we are not picking up changes made on .razor/.cshtml files.

dibarbet commented 11 months ago

I think this needs to go to Razor to take a look.

JohnGalt1717 commented 8 months ago

This still is an issue and makes the dev inner loop almost impossible to tollerate.

schaveyt commented 8 months ago

Solution:

  1. Open the terminal (Ctr ~)
  2. Type dotnet watch

PS. to force a full reload of the hot-reload.

  1. From the same terminal running dotnet watch, simply press Ctrl R

In my experience, this is how the majority of C# team who use Visual Studio Code operate. For those who what the Visual Studio experience, usual Visual Studio. Get the UI out of the way, so the engineer has more control.

github-actions[bot] commented 6 months ago

This issue has been marked as stale after 14 days of inactivity. @[ @ryzngard, @isadorasophia @], could you please take a look?

ryzngard commented 6 months ago

This is a known issue. @phil-allen-msft do we have a tracking issue for this that is on GH?

ktravelet commented 4 months ago

getting this while using .NET MAUI v0.12.42 (pre-release). Does this not work for Mac?

"Changes made in project 'MauiApp1 (net8.0-maccatalyst)' require restarting the application: Changes are not allowed with the targeted ARM64 CLR version. Consider switching to .NET 7 or newer."

ryzngard commented 3 months ago

Blocked until https://github.com/dotnet/razor/issues/10341 is done

@ktravelet please file a separate issue for .NET MAUI not working