我如何指定安装的NuGet包的目录? [英] How do I specify the directory where NuGet packages are installed?
本文介绍了我如何指定安装的NuGet包的目录?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
怎么办指定的目录,我想安装包?因为我需要在一个项目中,其他开发者的工作并安装软件包时,他们做的项目下载他们需要的都包在你的个人电脑。
How to do to specify the directory where I want install package? Because I need install packages in a project where others devs work and when they do download of the project they need have all packages in your pc.
推荐答案
的包走在$(SolutionDir)\包。你有两个选择:
The packages go in $(SolutionDir)\packages. You have two options:
- 检查包文件夹到源代码控制
- 使用 NuGetPowerTools 使开发人员计算机将自动取包时,你建
- 键入程序包管理器控制台安装,包NuGetPowerTools
- 键入程序包管理器控制台启用,PackageRestore
- 这增加了$(SolutionDir).nuget文件夹,其中包含一个MSBuild的目标时,他们要求将获取的包(例如,如果你创建一个机器已经没有他们)。 您必须检查.nuget文件夹,以及相关的csproj修改源代码控制!!
- Check the packages folder into source control
- Use NuGetPowerTools so that developer machines will automatically fetch the packages when you build
- Type "Install-Package NuGetPowerTools" in the Package Manager Console
- Type "Enable-PackageRestore" in the Package Manager Console
- This adds a $(SolutionDir).nuget folder, which contains an MSBuild target that will fetch the packages when they're required (eg. if you build on a machine that doesn't already have them). You must check the .nuget folder, and associated csproj changes into source control!!
我推荐的不可以检查包文件夹中,因为在DVCS二进制文件进行缓慢的克隆:-(在的NuGet的下一个版本,你不需要NuGetPowerTools,以避免检查它中: - )
I'd recommend not checking the packages folder in, since binary files in DVCS make for slow clones :-( In the next version of NuGet, you won't need NuGetPowerTools to avoid checking it in :-)
这篇关于我如何指定安装的NuGet包的目录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文