Can't install any NuGet Package if at least one Source is not available

nuget, visual-studio, visual-studio-2015

Solution

This is by design. Since we support searching across multiple sources for the packages that you need, we need to be able to reach all sources and get the package results before restoring these packages, to be deterministic and consistent in the way we do restore.

However, we understand that some users go into offline/online modes and we are investing in building a feature set that will enable you to temporarily disable some sources while you are working offline. In the meantime you can look into creating a custom nuget.config that does not contain the offending source and using that to restore when you are in the offline mode.

Problem

The following problem does not exist in VS2013 (Premium),I can only reproduce it in VS2015 (Enterprise) I've added a custom NuGet package source. If that source if not available I cannot install any package (for example EntityFramework) I get a message Attempting to gather dependency information for package 'EntityFramework.6.1.3' with respect to project 'ConsoleApplication9', targeting '.NETFramework,Version=v4.5.2' Exception'System.AggregateException' thrown when trying to add source 'http://XXX/FeedService.svc/'. Please verify all your online package sources are available. From the last line of the message I assume that this is not a bug but as I said it works on VS2013 Any idea why this has changed? Can I do anything about this?

Original source

Related problems