Creating a new Blazor WASM project will not run using dotnet run or Visual Studio non-debug mode. It will run in Visual Studio debug. Blazor server works properly. I do my development using VS debug mode, so I have no idea how long this has been broken.
The browser tools shows an exception while running WebAssemblyHostBuilder.CreateDefault(args); in Program.cs
Exception: System.TypeInitializationException: The type initializer for 'System.UriParser' threw an exception.
Any ideas? I am really stuck on this!
Thanks
I have tried reinstalling .NET sdks, Visual Studio, but am unable to fix this.