How to fix VS2015 CTP6 NuGet installation failure

As soon as I saw the first peek of Windows 10 adaptive UX displayed at Mobile World Congress 2015, I couldn't wait to try it out. I was already using Visual Studio 2015 CTP5, but the requirements clearly stated that I needed Visual Studio 2015 CTP6 and Windows 10 Technical Preview SDK (and Windows 10 installed, obviously), you can check the full requirements here.

So I began VS2015 CTP6 installation, but at the end the installer returned a warning with the following statement "Microsoft NuGet - Visual Studio 2015 Package failed". Since it was a warning I wasn't too worried. But I wanted to make sure everything was OK, before installing Windows 10 SDK, so I open Visual Studio and boom VS crashes. Obviously NuGet installation had something to do with it.

The problem happened because I used Visual Studio 2015 web installer and it automatically downloaded the latest version of NuGet from Visual Studio Extensions Gallery, however the latest version at that time (3.0.60225.100 released on 2/26/2015) is broken in VS2015 CTP6.

However the solution is quite simple, just follow this steps:

  1. close all your Visual Studio instances
  2. download Visual Studio 2015 CTP6 ISO (the full 4GB ), here's the link
  3. mount the ISO and find the NuGet package installer at "D:\packages\WPT\nuget14_VisualStudio.cab" NuGet installer location
  4. extract the contents of the ".cab" file to a directory, let's use "C:\VS2015-CTP6-NuGet-Fix" as a example NuGet install extracted
  5. open "Visual Studio 2015 Developer command prompt" usually found on the start menu, under Visual Studio 2015 folder VS2015 dev cmd
  6. uninstall NuGet using the following command by typing the following command VSIXInstaller /u:NuGet.0d421874-a3b2-4f67-b53a-ecfce878063b uninstall NuGet cmd
  7. close the developer command prompt and re-open it
  8. manually install the ".vsix" extracted in step 3 using the following command VSIXInstaller c:\VS2015-CTP6-NuGet-Fix\NuGet.Tools.vsix /admin install NuGet cmd

Open Visual Studio 2015 and voila. I hope this helps.