Blazor: Failed to launch debug adapter - visual-studio

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:
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
Also tried enabled and disabled:
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:
Don't know honestly what to try anymore. Could anyone help? Thanks in advance!

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.

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..

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.

Related

.NET 6.0 ASP.NET Core Web App Page Not Found Error

I created a brand new ASP.NET Core Web App project to test out the new features of .NET 6.0.
But when I tried to run the application with F5 nothing displayed on the web browser but "Page Not Found" error.
Also I tried with IIS Express and the result is same. Also tried http and it's same.
I don't have any idea what may be the problem?
After I rebooted my computer project runs well.
But sometimes later problem occurred again. I tried changing ports, rebooting, close and relaunch visual studio. None of them solved the problem.
Must be a computer specific problem but don't have any idea where to start. Really annoying.
So I keep searching and trying, I came up with this solution:
ASP.NET Core 404 Error on IIS 10
dotnet restore
dotnet run
It works for now but the problem related to debugging still persists.

"Unable to connect to 'IIS Express'." How do I fix this?

I've been trying to fix this for a while. I'm working on a cloud service and for some reason I get an error every time I try to run it. I've done everything I could think of doing.
I disabled and re-enabled SSL
I set an iplisten for 0.0.0.0 and made sure my computer wasn't currently using the port the project is using
I tried deleting applicationhost.config and even the whole .vs folder
I tried cleaning and rebuilding the project
In combination with messing with applicationhost.config and installing the .NET framework I needed, I restarted my computer
I'm pretty sure I tried a couple other things but they're slipping my mind at the moment. I'm currently using the following/have the following installed:
I'm using Microsoft Visual Studio Community Edition v16.10.31.321.278
.NET Core v5.0.0
.NET Framework 2.0, 3.0, 3.5, and 4.8
I have "Internet Information Services" and "Internet Information Services Hostable Web Core" enabled in my features tab
I'm running the latest version of Windows 10, completely up-to-date
The weird thing about all of this is that it works fine on my boyfriend's laptop, who's working with me on the project. I'm not exactly sure where to find the IIS logs either, if anyone knows and could let me know, that'd be very appreciated. I've grown tired of searching post after post to see that nothing helps. I'll upload the error logs later if I'm able to find them.
Did you try to run VS as Administrator ?
I used to have the same issue and find out it was the only way to solve this.

HTTP verbs PUT and DELETE stopped working

I have a ASP.NET Web API project where I use PUT and DELETE frequently. Sometime during the last couple of months PUT and DELETE stopped working. The web.config is still the same and the verbs works fine on my other machine.
I haven't worked with the project during this time. The only things I recall I have done is the Windows 10 anniversary update and a couple of Visual Studio updates, but I have done the same updates on my other machine.
During this time my WCF services stopped working too. In attempts to get them to work I reinstalled some Windows components. I have installed everything that has to do with IIS.
Can this verb problem have anything to do with missing Windows components? I have no idea what it can be.
Apparently I managed to install support for WebDav publishing when I reinstalled the Windows features for IIS. I removed it and got my PUT and DELETE back!

Apache Cordova VS2015 - Clear Cache on remote machine

I've started using Apache Cordova tools for VS2015 and using the remote build tool on a Mac to run iPhone simulators. When debugging the solution I'm seeing a lot of old JS files that are clearly not being updated on the Macs cache. It's equivalent to the browser not getting the latest version of a JS file and using the one in cache as the debugger stops on lines that are no longer or have moved.
How do I reset the cache on the Mac (remote device) so that it will load all of the latest files from my project?
Thanks for reporting the issue. If you do a clean build from VS then it should create a completely fresh project with no relation to the previous one and hence should use the latest version of your files.
I would like to know more about the old JS files that you are seeing, because typically each build should be using your most recent versions.
Let me know, what you find.
SOak

Can't install ASP.NET MVC3 RTM?

I'm trying to upgrade from ASP.NET MVC3 RC to RTM? I can't get past upgrading the vs10-kb2483190-x86.exe installer. I get this error in the error log:
Do I need to uninstall the Windows Phone SDK first? Should I hunt for GUIDs in the registry?
The installer appears to launch devenv.exe behind the scenes. I decided to launch VS2010 to see if it would "unlock" something. After it launched, I closed it and the installer started progressing.
Actually, it did work - I just ran for the second time...
When you run .msp, it pops a prompt that "the network resource for Visual Studio installation files is not available". Once you update the location of vs_setup.msi everything else works fine. I didn't have to run MSIs in sequence as the post suggests - once location was correct, I just ran MVC3 installation executable, and everything got installed fine.
It looks like platform installer and MVC3 setup just fail and, worse, swallow the root cause problem.
I finally gave up and reinstalled windows when I got a new CPU/Motherboard. Took care of it, not that I suggest this solution for everyone.

Resources