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