简体   繁体   English

从模板Visual Studio创建Blazor(ASP.NET Core Hosted)项目

[英]Creating an Blazor (ASP.NET Core Hosted) project from template Visual Studio

It seems like a fairly easy Task, but for some reason Visual Studio does not show me any Blazor templates besides the server-side hosting model. 这似乎是一个相当容易的任务,但由于某种原因,Visual Studio除了服务器端托管模型之外没有向我显示任何Blazor模板。

  • My .Net Core version: 3.0.100-preview6-012264 from dotnet --version . 我的.Net核心版本: 3.0.100-preview6-012264来自dotnet --version
  • My Visual Studio 2019 version: 16.1.6 . 我的Visual Studio 2019版本: 16.1.6

在此输入图像描述

Then I tried it in the CLI with the following command dotnet new blazorhosted like shown in the MSDN . 然后我在CLI中尝试使用以下命令dotnet new blazorhostedMSDN中所示。 It will only bring up the following error No templates matched the input template name: blazorhosted. 它只会出现以下错误: No templates matched the input template name: blazorhosted. and a list of available templates. 以及可用模板列表。 But I did manage to create the 'client-side' hosting-model eg dotnet new blazor , which isn't displayed in VS as well. 但我确实设法创建了“客户端”托管模型,例如dotnet new blazor ,它也没有在VS中显示。

I also tried to reinstall .Net Core Preview 6 as well as Visual Studio 2019, but with no success 我还尝试重新安装.Net Core Preview 6以及Visual Studio 2019,但没有成功

我想你需要先安装新的blazor模板:

dotnet new -i Microsoft.AspNetCore.Blazor.Templates::3.0.0-preview6.19307.2

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 从Visual Studio运行ASP.NET Core项目 - running ASP.NET Core project from Visual Studio 如何在Visual Studio的ASP.NET Core项目中使用Angular CLI项目模板 - how to use Angular CLI Project Template in ASP.NET Core project in Visual Studio 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 使用 asp.net 核心视觉工作室反应模板部署 Next JS 项目 - Deploy Next JS project with asp.net core visual studio react template Visual Studio 2017中新ASP.NET Core Razorpage的模板 - Template for new ASP.NET Core Razorpage in Visual Studio 2017 Visual Studio-无法启动ASP.NET Core项目 - Visual Studio - Cannot start ASP.NET Core project 如何在visual studio上运行asp.net core mvc项目? - How to run asp.net core mvc project on visual studio? 是否可以从Asp.net核心项目中的Visual Studio解决方案文件中隔离Docker容器? - Is it possible to isolate Docker container from Visual Studio solution files in an Asp.net core project? Visual Studio 2017 - 无法在 PC 上使用模板 API 编译新创建的 Asp.Net core 2.0 项目? - Visual Studio 2017 - cannot compile newly created Asp.Net core 2.0 project using template API on a PC? 在Visual Studio 2015更新3中缺少“ASP.NET核心Web应用程序(.NET核心)”模板? - missing “ASP.NET Core Web Application (.NET Core)” template in Visual studio 2015 update 3?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM