Must I still keep my 3rd party library binaries in

2020-02-08 09:52发布

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.

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

1条回答
beautiful°
2楼-- · 2020-02-08 10:51

Yes you can! http://docs.nuget.org/docs/workflows/using-nuget-without-committing-packages

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.

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.

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...

查看更多
登录 后发表回答