NuGet和分布式版本控制(DVCS) [英] NuGet and distributed version control (DVCS)

查看:196
本文介绍了NuGet和分布式版本控制(DVCS)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否可以使用nuget在版本控制中仅存储对所需软件包的引用(仅限于package.config并忽略软件包文件夹)。



有没有办法告诉nuget(重新)下载各种package.config文件中的所有引用包?或者类似的东西可以放到构建脚本中。



更新:

看起来我并不是唯一请求此功能的人:查看此工作项(谢谢到PHeiberg的提示)



更新2:

功能内置。请参阅在不将包提交到源代码控制的情况下使用NuGet 了解详情。剩下的就是把packages目录添加到.gitignore或者你的VCS的一些等价物中( / packages / )如果你在版本库的根目录下有这个技巧,使用git)。

解决方案

我刚刚了解到有关NuGetPowerTools: https://github.com/davidfowl/NuGetPowerTools



另请参阅: http://blog.davidebbo.com/2011/08/easy更新:NuGet 1.6现在支持Package Restore: http://docs.nuget.org/docs/release-notes/nuget-1.6

p>

I wonder if it is possible to use nuget to only store references to the required packages in version control (only the package.config and ignore the packages folder).

Is there a way to tell nuget to (re)download all the referenced packages in the various package.config files? Or something similar which could be put into a build script.

Update:

Seems that I'm not the only one who requested this feature: See this work item (thanks to PHeiberg for the hint)

Update 2:

NuGet now has this feature builtin. See Using NuGet without committing packages to source control for details. All left is to add the packages directory to .gitignore or some equivalent of your VCS (/packages/ will do the trick if you have it in the root of your repository and are using git).

解决方案

I just found out about NuGetPowerTools: https://github.com/davidfowl/NuGetPowerTools

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

Update: NuGet 1.6 now supports Package Restore: http://docs.nuget.org/docs/release-notes/nuget-1.6

这篇关于NuGet和分布式版本控制(DVCS)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆