1

This error occurs on the Bamboo build server during a command that restores my solution's NuGet packages. I can bypass this error by disabling the package restore task; however, this is only a temporary fix. Is there any way I can check if the dependency exists while running the task? This error occurs before MSBUILD is running. I am using .NET 4.5

2 Answers2

3

The already has a dependency defined for error when installing a NuGet package is due to a bug in older versions of NuGet.

You should look at updating NuGet on the build server or run your own build step that uses a version of NuGet that you download or deploy separately.

Community
  • 1
  • 1
Matt Ward
  • 47,057
  • 5
  • 93
  • 94
2

This issue is fixed if you use nuget version: 3.4.4+

https://dist.nuget.org/index.html

I would recommend using latest version

Balpreet Patil
  • 1,644
  • 2
  • 16
  • 16
  • 1
    This worked for me. When I went to Extensions > Tools in VS13, it was not giving me an option to update NuGet, which made me think I had the latest version. However, I didn't, and was able to upgrade from 2.8 --> 2.12 using your link. – Shane Sepac Nov 26 '16 at 17:55
  • I'm using Nuget 2.8.7 and I still have this issue, so your claim about being fixed in 2.8.6 is wrong – ympostor Jun 18 '17 at 13:42
  • still I updating to latest nuget does fix the issue. right? – Balpreet Patil Nov 01 '17 at 15:48