简体   繁体   English

将NuGet Packages文件夹添加到解决方案文件中?

[英]Add NuGet Packages Folder to Solution File?

Nuget puts the package in my root folder(in my case my trunk folder). Nuget将包放在我的根文件夹中(在我的情况下是我的trunk文件夹)。 I am wondering is there a way to let VS 2010 know about this folder? 我想知道有没有办法让VS 2010了解这个文件夹? I am using ankh svn to do my commuting so it would be really nice to have it in my solution so when I add a reference I can commit it from VS 2010 and not have to go to my trunk and manually do it. 我正在使用ankh svn进行通勤,所以在我的解决方案中使用它会非常好,所以当我添加引用时,我可以从VS 2010提交它而不必去我的主干并手动执行它。

Can this be done? 可以这样做吗?

You may be interested in reading this NuGet doc: 您可能有兴趣阅读此NuGet文档:

Using NuGet without committing packages to source control 使用NuGet而不将包提交给源代码控制

The easiest way to do this currently is by using the Working Copy Explorer (View -> Working Copy Explorer). 目前最简单的方法是使用工作副本资源管理器(查看 - >工作副本资源管理器)。 From here you can browse your solution folder, and add the reference. 从这里,您可以浏览解决方案文件夹,并添加参考。

I added the idea to enhance this to the AnkhSVN feedback forum , please go vote :-) 我在AnkhSVN反馈论坛上加入了这个想法,请去投票:-)

You should consider 'don't commit packages workflow'. 您应该考虑“不提交包工作流程”。 It is much more mature solution: 它是更成熟的解决方案:

http://blog.davidebbo.com/2011/08/easy-way-to-set-up-nuget-to-restore.html http://blog.davidebbo.com/2011/08/easy-way-to-set-up-nuget-to-restore.html

You can add the packages directory as a web project. 您可以将packages目录添加为Web项目。 I use TFS so the only issue is after adding a package I need to include these files to the source control but at least there visible... 我使用TFS所以唯一的问题是在添加一个包之后我需要将这些文件包含到源代码控制中,但至少可见...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM