'Loading... message when running a new standalone Blazor WebAssembly project
I am very new to Blazor. I am using Visual Studio 2022.
I have created a brand new C# Blazor WebAssembly without the hosted option.
My understanding is that I don't need the hosted option because I am not writing the backend at the same time as the client. The backend API that my Blazor client will use already exists.
I have done nothing with the new project except build it. When I run it (Debug > Start New Instance), I am expecting the usual default Hello World page with the Counter and Fetch Data tabs. However, I get a "Loading..." message only.
I googled and found this page:
https://docs.microsoft.com/en-us/aspnet/core/blazor/debug?view=aspnetcore-6.0&tabs=visual-studio
But the page describes running a hosted WebAssembly project.
So I created a hosted project. That runs fine. I get the working page up whether I run the server or the client.
So my question is:
It is possible to run a stand-alone WebAssembly project in Viusual Studio? Or only a hosted one?
If it's supposed to be possible, what should I be checking to figure out why my standalone project will not run?
Solution 1:[1]
Are you trying to run it in IISExpress. I just deployed a Web Assembly application - Net6 and Visual Studio 2022. My run looks like this:
Which works: My Solution was called BlazorApp6.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | MrC aka Shaun Curtis |

