简体   繁体   中英

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.

When I branch from the root the resulting branch has a yellow warning triangle in the references section for the AutoMapper and 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. The steps were:

  • Delete the packages folder (if it has been copied over) from the root of the solution
  • delete any NuGet references to the packages from the solution file (.sln)
  • delete any NuGet references from the packages.config files
  • Using Manage NuGet Packages for the solution to uninstall any packages
  • Reinstall from the solution level

And then all was fine.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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