NuGet can't resolve a dependency when updating a local package with dependencies from online repositories using Visual Studio 2015 Update 1
Asked Answered
D

2

8

This is very similar to the issue in this question: Local NuGet package dependencies - resolve from official Nuget feed?

I have a local package whose latest update now has a dependency of EnterpriseLibrary.TransientFaultHandling from NuGet.org. When I attempt to update the package, I get the following error:

Unable to resolve dependency 'EnterpriseLibrary.TransientFaultHandling'. Source(s) used: 'nuget.org', '(My Company)', 'Microsoft and .NET'.

In VS 2013, it updates without any issue. In VS 2015, as a workaround, I have to manually install the dependency and then I can do the update.

Am I missing something or is this just a bug in VS 2015?

Deuterium answered 22/1, 2016 at 18:45 Comment(2)
I had the exact same problem. I solved it using the package manager console, Update-Package MyPackage -Source MySourceFibrinous
imo there is a bug here beyond NuGet not checking the online sources, but also in saying that it did.Isoprene
D
11

The latest NuGet Package Manager (3.4.1.807) fixes this issue.

Set the Package Source to All and they will update across different package sources.

Deuterium answered 6/4, 2016 at 16:23 Comment(3)
Actually, it seems that 4+ has introduced a regression bug, causing this method to no longer work: github.com/NuGet/Home/issues/4768Annotation
I'm on nuget CLI 5.2.0 and seeing this, as well.Isoprene
Still getting in NuGet Version: 6.0.0.280 :)Harrold
G
0

I had to make sure that the nuget.org source was checked in my NuGet manager before it started to work.

enter image description here

Garfieldgarfinkel answered 29/8 at 20:18 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.