为什么Nuget Javascript包会复制到Scripts文件夹

编程入门 行业动态 更新时间:2024-10-10 10:24:40
本文介绍了为什么Nuget Javascript包会复制到Scripts文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我安装时,例如从Nuget到我的VS C#项目的jQuery,jquery.js最终出现在我的packages文件夹中。这很好,因为我不想将这个文件检查到我的源代码控制中,因为它不是我的代码而且我永远不会改变它 - 在这个上下文中它相当于我可能通过不同的包得到的DLL 。到目前为止,非常好......

When I install e.g. jQuery from Nuget into my VS C# project, jquery.js ends up in my packages folder. This is good, since I don't want to check this file into my source control, since it's not my code and I'm never going to change it - in this context it's the equivalent of a DLL I might get via a different package. So far, so good...

然后,为什么包安装程序还将文件复制到项目Scripts文件夹中,当然最好添加它到项目中作为包文件夹中文件的链接,就像项目引用Nuget包DLL一样。

Why, then, does the package installer also copy the file into the project Scripts folder, when surely it would be better to add it to the project as a link to the file in the packages folder, much as a Nuget package DLL would be referenced by the project.

推荐答案

<该团队决定放弃对nuget包中内容文件的支持。他们建议将其他包管理器用于客户端库,如npm,bower等。在studio 2015中有一个内置的支持。其中一个原因是每次在npm上更新一些客户端包回购微软团队中的一个人不得不把它重新打包成nuget并发布。 查看!

The team have decided to drop support for content files in nuget packages. And they are recommending to use other package managers for client side libraries like npm, bower etc. There is a built in support for them in studio 2015. One of the reasons is that every time some client package was updated on npm repo one of the guys in microsoft team had to fetch it repackage into nuget and publish. Check it out!

更多推荐

为什么Nuget Javascript包会复制到Scripts文件夹

本文发布于:2023-11-14 14:21:04,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1587445.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:文件夹   Nuget   Javascript   Scripts

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!