如何在Visual Studio的ASP.NET Core项目中使用Angular CLI项目模板 [英] how to use Angular CLI Project Template in ASP.NET Core project in Visual Studio
问题描述
我找到了一个用于在Visual Studio中创建和配置Angular CLI项目的市场模板(Angular CLI项目模板).
当我从市场下载并安装.VSIX
文件时,出现错误:
I found a marketplace template(Angular CLI Project Template) for creating and configuring an Angular CLI project in Visual Studio.
When I download and install .VSIX
file from the marketplace, the error:
The extension cannot be installed to this product due to prerequisites that cannot be resolved
出现.
我已经在计算机上安装了Visual Studio 2017,Node.js和Angular CLI.
I have installed Visual Studio 2017, Node.js and Angular CLI on my computer.
我知道有许多用于将Angular CLI与ASP.NET Core匹配的手动配置,但是此模板的工作原理相同.
I know that there are many manual configurations for matching Angular CLI with ASP.NET Core but this template seems to work as same.
推荐答案
我只是运行 Angular CLI项目模板vsix 安装程序,对我来说一切正常.
如果您检查 source.extension./a> Prerequisites
部分,您将看到:
I just run the Angular CLI Project Template vsix installer and all works fine for me.
If you check the source.extension.vsixmanifest Prerequisites
section you will see:
<Prerequisite Id="Microsoft.VisualStudio.Component.CoreEditor" Version="[15.0,16.0)" DisplayName="Visual Studio core editor" />
<Prerequisite Id="Microsoft.VisualStudio.Component.NuGet" Version="[15.0.26208.0,16.0)" DisplayName="NuGet package manager" />
<Prerequisite Id="Microsoft.VisualStudio.Component.Web" Version="[15.0.26323.1,16.0)" DisplayName="ASP.NET and web development tools" />
只需尝试安装您所缺少的那些,那之后我认为您应该会好的.为此,您需要更新Visual Studio 2017或安装缺少的组件.
Just try to install the ones you are missing and I think you should be fine after then. In order to do that you need to update your visual studio 2017 or get missed components installed.
仅供参考,我的Visual Studio 2017版本看起来像这样:
FYI my visual studio 2017 version looking like this:
这篇关于如何在Visual Studio的ASP.NET Core项目中使用Angular CLI项目模板的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!