简体   繁体   English

Visual Studio 2019 在哪里可以找到 .net core 3.1 的 WebAssembly 模板

[英]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。

Update更新

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.

相关问题 Visual Studio 2019 中的 Blazor WebAssembly .NET 5 模板 - Blazor WebAssembly .NET 5 template in Visual Studio 2019 更新 Visual Studio 2019 删除了 .NET Core 3.1 SDK - Updating Visual Studio 2019 removed .NET Core 3.1 SDK 在哪里可以找到 Visual Studio 2019 中的 gRPC 服务模板? - Where do I find the gRPC Service template in Visual Studio 2019? 缺少 Visual Studio 2019 blazor webassembly 应用程序模板 - Missing visual studio 2019 blazor webassembly app template Visual Studio 2019 似乎没有看到我安装了 .NET Core 3.1(使用 SDK) - Visual Studio 2019 Doesn't seem to see that I have .NET Core 3.1 Installed (with SDK) 从 Visual Studio 2019 将 ASP.NET Core 3.1 站点发布到 Azure 时出错 - Error publishing an ASP.NET Core 3.1 site to Azure from Visual Studio 2019 如何使用 Visual Studio 2019 在 Docker 容器中运行 ASP.NET Core 3.1 项目? - How to run an ASP.NET Core 3.1 project in a Docker container with Visual Studio 2019? Visual Studio 社区版 2019 和 AspNetCore 3.1 Angular 模板错误 - Visual Studio Community Edition 2019 & AspNetCore 3.1 Angular Template Error Visual Studio 2019 16.3.6 ASP.NET 内核 Web 应用项目模板确实允许 asp.net 内核版本选择 - Visual Studio 2019 16.3.6 ASP.NET Core Web Application project template does allow asp.net core version selection Visual Studio 2019 中缺少 ASP.NET 核心 Web 应用程序模板和所有 ASP.Net 核心模板 - Missing ASP.NET Core Web Application Template and all ASP.Net Core Templates in Visual Studio 2019
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM