每个从事同一VS项目的开发人员都需要添加Nuget软件包吗? [英] Do Nuget packages need to be added by every developer who works on same VS project?

查看:125
本文介绍了每个从事同一VS项目的开发人员都需要添加Nuget软件包吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用Nuget(RestSharp,Twilio等)向VS 2010解决方案中添加了一些库.当我从TFS将相同的解决方案下拉到新PC并尝试对其进行构建时,对那些程序集的所有引用都被破坏了(错误找不到命名空间...").对于每个首次使用此VS解决方案的开发人员,是否有必要在其PC上独立安装相同的Nuget软件包? 谢谢, 吉姆

I've added some libraries to a VS 2010 solution using Nuget (RestSharp, Twilio, etc.). When I pull the same solution down to a new PC from TFS and try to build it, all the references to those assemblies are broken (error "namespace cannot be found..."). Is it necessary for each developer who works on this VS solution for the first time to independently install the same Nuget packages on their PCs? Thanks, Jim

推荐答案

否,但是您需要确保所有程序集都包含在同一相对路径中,以便Visual Studio可以找到它们.您可以包括该解决方案的nuget软件包目录,我认为该目录存储该项目要引用的库的副本.

No, but you need to be sure the assemblies are all included in the same relative path so Visual Studio can find them. You can include the solution's nuget packages directories, which is where I think it stores a copy of the libraries to be referenced by the project(s).

附带地,包括所述目录可能实际上与安装软件包"相同.如果在包管理中包括NuGet使用的所有文件,则NuGet的行为将与安装它们时的行为相同.但是您不需要通过NuGet进行实际的软件包安装就可以正常工作...甚至无需首先在Visual Studio中安装NuGet.正确的文件只是Visual Studio项目文件所期望的位置而已.

Incidentally, including said diretories may be effectively the same as "installing the packages". If you include all the files that NuGet uses in its management of packages, NuGet will behave the same as if you had installed them. But you don't need to do the actual package install via NuGet for it to work... or even have NuGet installed in Visual Studio in the first place. It's just a matter of the proper files being where the Visual Studio project files expect them to be.

这篇关于每个从事同一VS项目的开发人员都需要添加Nuget软件包吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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