在 Blazor 新项目中找不到 Blazor WebAssembly 模板

Blazor WebAssembly template not found in Blazor new project

我已经安装了 dotnet SDK 3.1.201 到 Microsoft Visual Studio Professional 2019 Version 16.5.4 然后我安装了这个模板 dotnet new -i Microsoft.AspNetCore.Components.WebAssembly.Templates::3.2.0-preview5.20216.8 statred 在 VS 中创建一个新的 Blazor 项目只包含 Blazor Server App 模板我没有找到 Blazor WebAssembly App 模板我已经完成的所有步骤有什么问题。

您需要 Visual Studio (16.6)

的预览版

If you’re on Windows using Visual Studio, we recommend installing the latest preview of Visual Studio 2019 16.6. For this preview, you should still install the template from the command-line as described above to ensure that the Blazor WebAssembly template shows up correctly in Visual Studio and on the command-line.

https://devblogs.microsoft.com/aspnet/blazor-webassembly-3-2-0-preview-5-release-now-available/

我在尝试安装模板时遇到了同样的问题,我的问题是我为自己制作了一个简单的 Nuget 包,但它已在 Nuget 包管理器中删除,如果您有任何不可用的包,请将其删除。 我在安装 Blazor 模板期间遇到此错误(错误:本地源 'C:\Users\mypc\Desktop\dotnet-standard-getting-started\demos\Testingapp.Storage\bin\Debug' 不存在。) 工具 ---> 选项 ---> 在 Nuget 包管理器下

在您 select Blazor 项目类型(服务器或 Web-Assembly 步骤)之前 只需在框架之间切换 (3.0 和 3.1),菜单将更新,您将能够看到 WASM Blazor 版本: