Blazor Live Edit: Not Working

Hello,

I am working on a Blazor Web App with Rider and I would like to see the changes on my page in real time. After researching, I found out that it’s the Live Edit feature that handles this in Debug mode. However, it’s not working. Is this normal?

Edit: I have finally found a solution, which I believe is not official. You need to manually modify the launchSettings.json file and add this profile:


"httpsWatch": {
  "commandName": "Executable",
  "executablePath": "dotnet",
  "workingDirectory": "$(ProjectDir)",
  "hotReloadEnabled": true,
  "hotReloadProfile": "aspnetcore",
  "commandLineArgs": "watch run",
  "launchBrowser": true,
  "environmentVariables": {
    "ASPNETCORE_ENVIRONMENT": "Development"
  },
  "applicationUrl": "https://localhost:3251;http://localhost:6362"
}

I don’t understand why this is not functional by default when I am paying for what should normally be a quality software.

0
1 comment

We have an on-going feature request here:

RIDER-69647 Support .NET6 Hot Reload for Blazor Server & Blazor WebAssembly apps

Currently the Blazor hot reload only works when you execute the application directly, without debugging. We need to re-implement the debugger under hot reload. 

You can use the dotnet watch to monitor the changes in your code files, but it will show some problems if your application using realtime compilation features relaying on Node.js (like TailwindCSS). In this case, you will need to adjust your launch profile as well.

 

1

Please sign in to leave a comment.