我目前正在通過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