POST POST

JUL
23
2015

Workaround: NuGet Packages Failing to Download in Visual Studio 2015 RTM

ORIGINALLY POSTED TO: http://jameschambers.com/2015/07/workaround-nuget-packages-failing-to-download-in-visual-studio-2015-rtm/

I haven't figured out a common theme yet, but certain packages are failing to restore when you attempt to install them from the NuGet primary feed via the project.json file in Visual Studio 2015. Thanks to Brock Allen for confirming I wasn't going insane.

A couple of things I've discovered:

  • This seems to be more common for prerelease packages
  • It seems to work if the package has a previous release version (not in pre)

As a workaround, you can add the packages manually via the dialog in Visual Studio, just make sure you hit that pre-release flag:

image

If that doesn't work for you – sometimes I'm not seeing the package above in my feed – if you have it you can add another NuGet feed to an alternate package source, like I've done here with AutoFac's nightly build feed:

image

The other thing is that once you get it installed in your system cache, it will resolve it from there, which I imagine makes it harder to triage for anyone trying to figure out what's going on.

I'm seeing various confirmations of this on Twitter:

image

image

With NuGet 3 being release (and part of VS 2015) I think some package authors are unsure if it's their problem or what the case may be. Depending on the method you come at it, it's possible that you can still get the package, but I would say it seems unpredictable right now.


James Chambers

Email Email
Web Web
Twitter Twitter
GitHub GitHub
LinkedIN LinkedIn
RSS

Looking for someone else?

You can find the rest of the Western Devs Crew here.

© 2015 Western Devs. All Rights Reserved. Design by Karen Chudobiak, Graphic Designer