Visual Studio 2019在哪里找到.net Core 3.1的WebAssembly模板 [英] Visual Studio 2019 where to find WebAssembly template for .net core 3.1
问题描述
我正在使用最新的Visual Studio 2019(16.4.2,日期为2020年1月8日).
I'm using very latest (16.4.2, dated 8th Jan 2020) Visual Studio 2019.
当我尝试创建Blazor WebAssembly解决方案时,尽管"blazor app"的描述中包含"server or webassembly"一词,但是当我进入创建页面时,只有"Server"选项可用,并且它成功创建了Core 3.1应用程序
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.
我以为会有最新版本,所以我去了Visual Studio市场网站,没有找到Blazor扩展,因此在Internet上我发现运行此命令:
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:
dotnet新-i Microsoft.AspNetCore.Blazor.Templates :: 3.1.0-preview2.19528.8
dotnet new -i Microsoft.AspNetCore.Blazor.Templates::3.1.0-preview2.19528.8
(通过找到缺少的Visual Studio 2019 blazor webassembly应用模板
(found via Missing visual studio 2019 blazor webassembly app template)
它奏效了,我有了Web程序集选项.但是,当我查看使用WebAssembly创建的项目时,它使用的是.net Core 2.0,而选项最多只能显示2.1.我以"3.1.0"部分为准,这将是最新的名称.
And it worked, I got web assembly option. 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. I presumed by the '3.1.0' section in the name it would be the latest.
有人知道我如何获得最新的模板,而不是随机搜索并使用.net core 3.1吗?
Any idea how I get the latest template rather than random searching and use .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.
推荐答案
在CLI的或的工具-> Nuget软件包管理器->软件包管理器控制台中运行以下命令:
Run the following in a CLI or in Tools -> Nuget package Manager -> Package Manager Console:
dotnet new --install Microsoft.AspNetCore.Components.WebAssembly.Templates::3.2.0-preview3.20168.3
上面的NuGet程序包位于此处.
The NuGet package for above is here.
Get started with ASP.NET Core Blazor here.
这篇关于Visual Studio 2019在哪里找到.net Core 3.1的WebAssembly模板的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!