我安装时,例如从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文件夹
发布评论