的NuGet用于多个项目的解决方案 [英] NuGet for solutions with multiple projects
本文介绍了的NuGet用于多个项目的解决方案的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
假设我有3个项目的解决方案:
Suppose I have a solution with 3 projects:
- 核心
- 在UI
- 测试
有些我使用将适用于所有3个项目的NuGet包。有些人会只适用于用户界面和测试,有的只是适用于测试(如NUnit的)。
Some of the NuGet packages I use will apply to all 3 projects. Some will just apply to UI and Tests, and some will just apply to Tests (like NUnit).
什么是右办法使用的NuGet来设置呢?
What is the right way to set this up using NuGet?
- 我应该用在所有三个项目的添加库包参考任何时候,我需要一个参考?
- 我应该使用添加库包参考第一次,我需要一个包,然后用添加参考 - >浏览随后的用法?
在这两种情况下,有多少的 packages.config 的文件,我应该有吗?
In either case, how many packages.config files should I have?
推荐答案
有关人过这个绊脚石,现在有一个选项:
For anybody stumbling across this, now there is an option for :
Tools > Library Package Manager > Manage NuGet Packages for Solution...
如果你去安装包区,你可以在每一个项目管理的单一封装解决方案中。
And if you go to the Installed packages area you can 'Manage' a single package across every project in the solution.
这篇关于的NuGet用于多个项目的解决方案的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文