[英]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模板。
3.0.100-preview6-012264
from dotnet --version
. 3.0.100-preview6-012264
来自dotnet --version
。 16.1.6
. 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 blazorhosted
如MSDN中所示。 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.