0

kind of desperate with this problem that I don't know how to fix and I don't know the cause. Full error when running Blazor app:

enter image description here

It's a WASM application hosted in .net core. Therefore there is a backend and a frontend. I have set my backend project as Startup project, which will take care of hosting also the frontend. Both projects are set up on .NET 5. I have read that multiple factors can cause this error and yet I tried all the possible solutions I have found so far.

  • I kill manually the app processes that hang running even when I stop debugging, closed VS, deleted the whole .vs folder and then restarted VS.

  • I disabled script debugging
    enter image description here

  • Also tried enabled and disabled:
    enter image description here

  • Tried also to start it with latest version of Microsoft Edge instead of Chrome, sometimes it works and doesn't give troubles sometimes it doesn't

  • in a post I have read from the official support that it's a bug that is being solved already in the 16.10 VS preview version. I downloaded and installed it, still nothing.

  • tried both iisExpress and .net CLI as hosting profile.

Moreover when starting the app a normal blank page only opens on the browser:

enter image description here

Don't know honestly what to try anymore. Could anyone help? Thanks in advance!

Tarta
  • 1,729
  • 1
  • 29
  • 63
  • There could be a lot of reason for this. In case you haven't seen these threads, I suggest start here and read all the possible solutions: https://stackoverflow.com/questions/62349412/unable-to-debug-blazor-hosted-webassembly-3-2-0-from-visual-studio-2019-16-6-2. https://stackoverflow.com/questions/63268544/failed-to-launch-debug-adapter-when-using-x86-with-blazor. https://stackoverflow.com/questions/65230472/one-or-more-errors-occurred-failed-to-launch-debug-adapter-visual-studio-2019 – Jason D May 07 '21 at 10:33
  • One idea you might try is to install and use Firefox. It's not a solution but maybe a temporary workaround to try a non-chromium browser. – Jason D May 07 '21 at 10:36

3 Answers3

1

I have had the same problem exactly with the same setup, this on a couple times and on both occasions I have deleted the VS folder, did a rebuild and then rebooted my PC.

I know this is not a root cause solution, but it has worked for me.

IvanMendoza
  • 121
  • 6
  • UPDATE: Sometimes when you run the app and browser is launched it keeps opening even when you stop the execution and this cause this error, just close the opened browser instance and run again. – IvanMendoza Aug 29 '22 at 14:50
1

In my case it was missing the latest ASP.NET Core framework...

Make sure you get the hosting bundle.

.NET location: C:\Program Files\dotnet\
The following frameworks were found:
  6.0.9 at [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Learn about framework resolution:
https://aka.ms/dotnet/app-launch-failed
To install missing framework, download:
https://aka.ms/dotnet-core-applaunch?framework=Microsoft.AspNetCore.App&framework_version=6.0.10&arch=x64&rid=win10-x64

I had to restart VS after installing..

Ruina
  • 125
  • 1
  • 8
0

Updating to the latest hosting bundle did the trick for me. I also threw out the .vs folder as well as any obj and bin folders in the solution projects to ensure a nice and clean environment.

Reboot. Rebuild. Rejoice.

Dimitri Troncquo
  • 354
  • 2
  • 11