我目前正在通过https://channel9.msdn.com/Events/Visual-Studio/Visual-Studio-2017-Launch/WEB-103
在Mac上设置Visual Studio中的Spa应用程序(macOS Sierra,Visual Studio Community 2017)。使用Visual Studio在Mac上创建一个新的Angular项目
我已经成功安装了角度核心,并且正在尝试根据其中一个安装的模板创建一个新项目。
我可以看到两个角模板当我运行sudo dotnet new -l
:
MVC ASP.NET Core with Angular angular [C#] Web/MVC/SPA ASP.NET Core with Angular angular [C#] Web/MVC/SPA
当运行sudo dotnet new angular
,我不断收到以下错误:
Unable to determine the desired template from the input template name: angular.
The following templates partially match the input. Be more specific with the template name and/or language.
Templates Short Name Language Tags
----------------------------------------------------------------------------
MVC ASP.NET Core with Angular angular [C#] Web/MVC/SPA
ASP.NET Core with Angular angular [C#] Web/MVC/SPA
Examples:
dotnet new angular
dotnet new angular
dotnet new --help
有什么在我的命令失踪了? Visual Studio/dotnet配置不正确?
你怎么安装模板?,做到这一点的方式是'dotnet new --install Microsoft.AspNetCore.SpaTemplates :: *' – Hackerman
@Hackerman Yup!实际上,这正是我所做的。 – narner
我们可以测试一件事情....我在想什么是你的MAC中默认安装的VS 2017,已经安装了角模板...你可以做的是运行'dotnet new -u angular' ...然后检查两个模板都没有了....然后再次使用'dotnet新安装--install Microsoft.AspNetCore.SpaTemplates :: *' – Hackerman