我还必须将我的第 3 方库二进制文件保留在源代码管理中吗? [英] Must I still keep my 3rd party library binaries in source control?

查看:60
本文介绍了我还必须将我的第 3 方库二进制文件保留在源代码管理中吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

既然我正在使用 NuGet 添加/更新我需要的引用,是否可以只将 packages.config 添加到源代码管理并在构建时添加 .dll?

Now that I'm using NuGet to add/update my required references, is it possible to only add packages.config to source control and have the .dlls added at build time?

通常,如此相关问题中所述,我将第三方依赖项存储在解决方案根目录下的一个文件夹,并将它们签入源代码管理.

Normally, like described in this related question, I store third party dependencies in a folder under the solution root and check them in to source control.

我们目前没有使用任何自定义构建工具或脚本:只是使用 .sln 文件的 VisualStudio 的默认构建.

We're currently not using any custom build tools or scripts: just VisualStudio's default build with the .sln file.

推荐答案

是的,你可以!http://docs.nuget.org/docs/workflows/使用 nuget-without-committing-packages

当前的 NuGet 工作流程一直是将 Packages 文件夹提交到源代码管理中.原因是它与开发人员在没有 NuGet 时通常会做的事情相匹配:他们创建一个Lib"或ExternalDependencies"文件夹,将二进制文件转储到那里并将它们提交给源代码控制以允许其他人构建.

The current NuGet workflow has always been to commit the Packages folder into source control. The reasoning is that it matches what developers typically do when they don't have NuGet: they create a ‘Lib' or ‘ExternalDependencies' folder, dump binaries into there and commit them to source control to allow others to build.

虽然这对一些用户来说效果很好,但我们也从很多人那里听说,将包提交到源代码管理中并不是他们想要做的.当使用像 Mercurial 或 Git 这样的 DVCS 时,提交二进制文件会随着时间的推移疯狂地增加存储库的大小,使克隆变得越来越痛苦.事实上,这是 NuGet 我们的问题跟踪器上最热门的请求之一.

While this has worked fine for some users, we have also heard from many that committing packages into source control is not what they want to do. When using a DVCS like Mercurial or Git, committing binaries can grow the repository size like crazy over time, making cloning more and more painful. In fact, this has been one of the top requests on NuGet our issue tracker.

好消息是,NuGet 现在提供了一个工作流程,可以帮助解决这个问题.它还不是 100% 自动化,但是您可以设置您的项目来执行此操作...

The good news is that NuGet now offers a workflow which goes a long way to solving this problem. It isn't 100% automated yet, but with some minimal pain you can set up your project to do this...

这篇关于我还必须将我的第 3 方库二进制文件保留在源代码管理中吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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