简体   繁体   English

使用TFS在VS 2010中进行分支会丢失NuGet包引用

[英]Branching in VS 2010 with TFS loses NuGet package references

I am using Visual Studio 2010 with Team Foundation Server 2010. I have created a root for a project which uses AutoMapper and EntityFramework which I installed for the solution using NuGet package manager. 我将Visual Studio 2010与Team Foundation Server 2010一起使用。我为使用AutoMapper和EntityFramework的项目创建了一个根,该项目是使用NuGet程序包管理器为解决方案安装的。

When I branch from the root the resulting branch has a yellow warning triangle in the references section for the AutoMapper and EntityFramework. 当我从根分支时,结果分支在AutoMapper和EntityFramework的引用部分中具有黄色警告三角形。 I have tried uninistalling the packages and then reinstalling but nothing allows me to include these references and build the solution. 我尝试取消安装软件包,然后重新安装,但是没有任何内容允许我包含这些引用并构建解决方案。 The only message I get is that the package aready exists. 我收到的唯一消息是包装区域已存在。

All suggestions gratefully received. 感谢所有建议。

I have solved the problem. 我已经解决了问题。 The root solution was a created from existing projects from another source and there were some NuGet package references in the packages.config files in the project folders. 根解决方案是从另一个来源的现有项目创建的,并且项目文件夹中的packages.config文件中有一些NuGet软件包引用。 The steps were: 这些步骤是:

  • Delete the packages folder (if it has been copied over) from the root of the solution 从解决方案的根目录中删除packages文件夹(如果已被复制)
  • delete any NuGet references to the packages from the solution file (.sln) 从解决方案文件(.sln)中删除对软件包的任何NuGet引用
  • delete any NuGet references from the packages.config files 从packages.config文件中删除任何NuGet引用
  • Using Manage NuGet Packages for the solution to uninstall any packages 使用管理NuGet程序包解决方案来卸载所有程序包
  • Reinstall from the solution level 从解决方案级别重新安装

And then all was fine. 然后一切都很好。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM