加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程开发 > asp.Net > 正文

npm不包含在ASP.NET Core Web Application中

发布时间:2020-12-16 06:39:57 所属栏目:asp.Net 来源:网络整理
导读:我正在尝试学习ASP.NET Core 1.0,我正在使用“Web应用程序”模板创建一个ASP.NET Core项目,但我发现与我期望的差异.我认为npm和gulp被列入项目,因为 documentation声明: The template also includes Node Package Manager (npm) and Gulp,making it easier
我正在尝试学习ASP.NET Core 1.0,我正在使用“Web应用程序”模板创建一个ASP.NET Core项目,但我发现与我期望的差异.我认为npm和gulp被列入项目,因为 documentation声明:

The template also includes Node Package Manager (npm) and Gulp,making it easier to add bundling and minification to a project.

并且:

When you create a new web project using ASP.NET Core Web Application template,Visual Studio includes the Gulp.js npm package,the gulpfile.js file,and a set of Gulp dependencies.

但是,我没有看到npm作为包管理选项,也没有看到任何与npm或Gulp相关的文件.但是,我确实看到了Bower的选择.

我使用的是Microsoft .NET Core Tools 1.0.0(预览版2).

解决方法

gulp / grunt / npm仍然受支持,但已从ASP.NET Core RTM附带的预览工具中的默认项目模板中删除

我想你可以手动添加一个package.json文件和一个gulpfile.js,并在web应用程序的project.json的scripts部分进行一些编辑,以恢复在RC2中的业务

默认模板使用新的bundler minifier

如果你想了解变化背后的原因,那么在community standup还有关于它的讨论

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读