[英]Visual Studio 2019 where to find WebAssembly template for .net core 3.1
I'm using very latest (16.4.2, dated 8th Jan 2020) Visual Studio 2019.我正在使用最新的(16.4.2,日期为 2020 年 1 月 8 日)Visual Studio 2019。
When I tried to create a Blazor WebAssembly solution, although the description for 'blazor app' included the words 'server or webassembly', when I got to the create page, only Server option was available and it successfully creates Core 3.1 application.当我尝试创建 Blazor WebAssembly 解决方案时,尽管“blazor 应用程序”的描述包含“服务器或 webassembly”一词,但当我进入创建页面时,只有服务器选项可用,并且它成功创建了 Core 3.1 应用程序。
I assumed latest version would be there, so I went to the Visual Studio marketplace website and there were no Blazor extensions to be found, so looking on the internet I found running this command:我以为会有最新版本,所以我去了 Visual Studio 市场网站,没有找到 Blazor 扩展,所以在互联网上查找我发现运行以下命令:
dotnet new -i Microsoft.AspNetCore.Blazor.Templates::3.1.0-preview2.19528.8
dotnet new -i Microsoft.AspNetCore.Blazor.Templates::3.1.0-preview2.19528.8
(found via Missing visual studio 2019 blazor webassembly app template ) (通过Missing Visual Studio 2019 blazor webassembly 应用模板找到)
And it worked, I got web assembly option.它奏效了,我得到了 Web 程序集选项。 However, when I look at my project created using WebAssembly it is using .net Core 2.0 and the options only go as far as 2.1.
但是,当我查看使用 WebAssembly 创建的项目时,它使用的是 .net Core 2.0,而选项仅适用于 2.1。 I presumed by the '3.1.0' section in the name it would be the latest.
我推测名称中的“3.1.0”部分是最新的。
Any idea how I get the latest template rather than random searching and use .net core 3.1?知道如何获取最新模板而不是随机搜索并使用 .net core 3.1 吗?
If there is a better way, can anyone let me know how to uninstall templates as I failed to find out how.如果有更好的方法,任何人都可以让我知道如何卸载模板,因为我没有找到方法。
Run the following in a CLI or in Tools -> Nuget package Manager -> Package Manager Console:在 CLI或工具 -> Nuget 包管理器 -> 包管理器控制台中运行以下命令:
dotnet new --install Microsoft.AspNetCore.Components.WebAssembly.Templates::3.2.0-preview3.20168.3
The NuGet package for above is here .上面的 NuGet 包在这里。
Get started with ASP.NET Core Blazor here . 在此处开始使用 ASP.NET Core Blazor。
The latest release is now an RC and can be installed with the following:最新版本现在是 RC,可以通过以下方式安装:
dotnet new -i Microsoft.AspNetCore.Components.WebAssembly.Templates::3.2.0-rc1.20223.4
The latest preview release as of April 30th can now be installed with the following:截至 4 月 30 日的最新预览版现在可以通过以下方式安装:
dotnet new -i Microsoft.AspNetCore.Components.WebAssembly.Templates::3.2.0-preview5.20216.8 dotnet new -i Microsoft.AspNetCore.Components.WebAssembly.Templates::3.2.0-preview5.20216.8
This requires the latest dotnet core SDK 3.1.201 .这需要最新的 dotnet 核心 SDK 3.1.201 。
To check for the latest preview you can check the ASP.NET blog .要查看最新预览,您可以查看ASP.NET 博客。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.