Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 902
Kcoder Avatar asked Jan 22 '16 18:01

Kcoder


People also ask

How do I Update NuGet dependencies?

By Command-line: You can download nuget.exe,and add the path where it exists to Path system environment variables. Then you could simply reference the nuget.exe directly. After that you can use command like nuget update YourSolution. sln in Package Manager Console to update the dependencies for solution.

How do I resolve a NuGet package?

Navigate to Tools > Options > NuGet Package Manager > General, and then select the Allow NuGet to download missing packages check box under Package Restore. Enabling Restore NuGet Packages. In Solution Explorer, right-click the solution, and then select Restore NuGet Packages. Selecting Restore NuGet Packages.


1 Answers

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.

like image 162
Kcoder Avatar answered Sep 25 '22 21:09

Kcoder