Packages not loading after installing Visual Studio 2015 RTM

Solution 1:

I have Visual Studio 2012, 2013 and 2015 all installed on my machine. After installing Visual Studio 2013 Update 5, I started getting the "package did not load correctly" error in VS 2013.

All I did to get it working was to follow this step:

  1. Close all instances of Visual Studio
  2. Delete everything in this folder C:\Users\%username%\AppData\Local\Microsoft\VisualStudio\12.0\ComponentModelCache
  3. Restart Visual Studio

Though I have not tried this for Visual Studio 2015, I believe this should solve the problem too. To do this for Visual Studio 2015, 12.0 should be changed to 14.0.

UPDATE

Instead of deleting everything in the folder (as suggested by step 2 above), it is much more safer to rename the folder and allow Visual Studio create a new one. Sometimes, you might have to copy somethings over from the old folder.

Solution 2:

One more workaround for Visual Studio 2015 Update 1

  1. Open c:\Users\{User_Name}\AppData\Local\Microsoft\VisualStudio\14.0\devenv.exe.config
  2. Change binding redirection for System.Collections.Immutable, newVersion should be 1.1.37.0 (not 1.1.36.0).

The redirection should look like this:

    <dependentAssembly>
        <assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
        <bindingRedirect oldVersion="1.0.27.0-1.1.65535.65535" newVersion="1.1.37.0"/>
    </dependentAssembly>

Error from ActivityLog.xml:

SetSite failed for package [CSharpPackage][Could not load file or assembly 'System.Collections.Immutable, Version=1.1.36.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)]:{ at Microsoft.VisualStudio.LanguageServices.Implementation.LanguageService.AbstractPackage`2.Initialize() at Microsoft.VisualStudio.LanguageServices.CSharp.LanguageService.CSharpPackage.Initialize() at Microsoft.VisualStudio.Shell.Package.Microsoft.VisualStudio.Shell.Interop.IVsPackage.SetSite(IServiceProvider sp)}

You can read more about how to troubleshoot such issues in my blog post How to restore Visual Studio 2015 after the Update 1.