3

Is it my idea or Rider doesn't have implemented the Blazor / Hot Reload well?

I'm trying for more than 6 months Rider IDE from JetBrains, and I started to prefer against VS2022. But I recently started a new project with Blazor, and since then my opinion start to come down...

There is no way to debug a solution with multiple projects (as VS2022 does)... example, I have a single solution with 1 Server Project, 1 Client Project, and 1 Shared Project.

With VS2022 I was able to debug both projects without pain... but I tried for a month with Rider and is totally unpleasant... Am I the only one with this opinion?

There is a way to debug properly a solution with multiple projects in Rider and .Net 6 and using the Hot Reload feature?

MiBol
  • 1,985
  • 10
  • 37
  • 64
  • That's not a question anyone other than JetBrains can answer properly, https://youtrack.jetbrains.com/issues/RIDER – Lex Li Aug 30 '22 at 01:29

2 Answers2

10

You should update your launchSettings.json like this. after that change your running profile to httpsWatch

This solution will work for Blazor

    "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"
    },
Mehmet Erdoğdu
  • 190
  • 2
  • 8
  • This worked for me. I had to switch to the "https" profile and choose this running profile. – asaf92 Jul 01 '23 at 08:05
1

Press CTRL + ALT + 1 (above the Q button) and type:

dotnet watch run --project <projectName>
Marek Schwarz
  • 350
  • 5
  • 13