Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hot Reload not working #1585

Open
luis-pirela opened this issue Nov 6, 2024 · 4 comments
Open

Hot Reload not working #1585

luis-pirela opened this issue Nov 6, 2024 · 4 comments
Assignees
Labels
area-hotreload Issues with Hot Reload experiences area-razor bug Something isn't working

Comments

@luis-pirela
Copy link

luis-pirela commented Nov 6, 2024

I did not find any closed issue that solves the problem and I did not fine any open issue regarding the problem.

I already checked Why isn't C# Dev Kit activating / C# Dev Kit commands are not found? but same issue persists

Does this issue occur when all extensions are disabled?: Yes, I even tried with a DevContainer where I only installed the C# Dev Kit (and its dependencies) and the issue persists

VS Code Version: 1.95.1
OS Version: Windows 11 Version 24H2 (OS Build 26100.2033)
C# Dev Kit v1.12.37 (pre-release). Issue persists also with latest relased version.
C# v2.54.20 (pre-release). Issue persists also with latest relased version.
.NET Install Tool v2.2.2
Issue persists with "Dotnet: Prefer CSharp Extension" set to false (so, disabled)
Issue persists with Hot Reload enabled in settings
"Hot Reload is available" is shown in the toolbar
I am using MS Edge as browser
With dotnet watch it works

Expected Behavior:
Hot Reload on Save should work. So when saving with Ctrl + Schift + Enter or by clicking Hot Reload, the changes should be shown in the Blazor Web App running on Edge browser

Steps to Reproduce:
Clean installation of VS Code with the mentioned versions + installation of C# Dev Kit with the mentioned version. The project I am using is a Blazor Server App with .NET 8

@phil-allen-msft phil-allen-msft added the area-hotreload Issues with Hot Reload experiences label Nov 6, 2024
@BretJohnson
Copy link
Member

@luis-pirela - when clicking the Hot Reload button, what exactly do you see happen in VS Code? What do you see in the .NET Hot Reload Output window in VS Code?

@luis-pirela
Copy link
Author

@luis-pirela - when clicking the Hot Reload button, what exactly do you see happen in VS Code? What do you see in the .NET Hot Reload Output window in VS Code?

Image

I get:
"2024-11-11 07:20:49.831 [info] Starting session.
2024-11-11 07:21:46.815 [info] 💡 Possible code changes were found.
2024-11-11 07:21:49.568 [info] Checking for code updates...
2024-11-11 07:21:51.081 [info] Applying code updates...
2024-11-11 07:21:51.683 [info] Code changes were successfully applied."

However, the changes are not automatically synchronized.

@webreidi webreidi added the bug Something isn't working label Nov 12, 2024
@jtlowe-illinois
Copy link

jtlowe-illinois commented Nov 18, 2024

I am also experiencing a similar Hot Reload issue in an ASP.NET Core MVC .NET 9 project. The Hot Reload output says "Code changes were successfully applied" but the browser does not auto-reload and haven't been applied even when I refresh manually. I have to restart the debug session to pick up the changes.

Version: 1.95.3 (user setup)
Commit: f1a4fb101478ce6ec82fe9627c43efbf9e98c813
Date: 2024-11-13T14:50:04.152Z
Electron: 32.2.1
ElectronBuildId: 10427718
Chromium: 128.0.6613.186
Node.js: 20.18.0
V8: 12.8.374.38-electron.0
OS: Windows_NT x64 10.0.19045

C# Dev Kit v1.13.9

@mikehutter
Copy link

I too am having this issue.

Version: 1.95.3 (user setup)
Commit: f1a4fb101478ce6ec82fe9627c43efbf9e98c813
Date: 2024-11-13T14:50:04.152Z
Electron: 32.2.1
ElectronBuildId: 10427718
Chromium: 128.0.6613.186
Node.js: 20.18.0
V8: 12.8.374.38-electron.0
OS: Windows_NT x64 10.0.22631

The application is a blazor wasm on .NET 8.0

All I get in the .NET Hot Reload output is:
2024-11-19 12:57:45.284 [info] 💡 Possible code changes were found.
2024-11-19 12:57:55.859 [info] Code changes were successfully applied.

But the application does not update and I must restart debugging to see changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-hotreload Issues with Hot Reload experiences area-razor bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants