Unable to debug Blazor hosted webassembly 3.2.0 from Visual Studio 2019 16.6.2

后端 未结 5 1333
迷失自我
迷失自我 2021-01-04 12:00

I have Visual Studio 2019 16.6.2 installed, along with the .NET Core 3.1.301 SDK and all the necessary Blazor templates.

If I create a brand new Blazor WebAssmbly app

5条回答
  •  我在风中等你
    2021-01-04 12:16

    This sounds extremely naïve but this was the entire problem for me. I didn't notice this line was removed in the diff.

    Make sure your main builds and runs the CreateHostBuilder function.

    This unfortunately causes the same error above but is not at all directly related.

    public static void Main(string[] args)
    {
        CreateHostBuilder(args).Build().Run();
    }
    ...
    public static IHostBuilder CreateHostBuilder(string[] args)
    ...
    

提交回复
热议问题