Packages not loading after installing Visual Studio 2015 RTM
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:
- Close all instances of Visual Studio
- Delete everything in this folder
C:\Users\%username%\AppData\Local\Microsoft\VisualStudio\12.0\ComponentModelCache
- 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.
Due to extensions in Visual Studio 2015, I had to rename: C:\Users\\AppData\Local\Microsoft\VisualStudio\14.0
Once renamed, I opened Visual Studio 2015 and received more of these errors but the 14.0 folder was recreated.
I closed Visual Studio 2015 and copied the folders Extensions and STemplate from the original/renamed folder to the new one.
I reopened Visual Studio 2015 and all is working again.
Update 2015-09-24T0017:
It stopped working again. I tried all options in this post. I found another post and this seems to have worked:
Run:
devenv /clearcache
devenv /updateconfiguration
I've had the same problem with Visual Studio 2015 Community RTC and was able to fix this by deleting everything in:
C:\Users\<your users name>\AppData\Local\Microsoft\VisualStudio\14.0
andC:\Users\<your users name>\AppData\Roaming\Microsoft\VisualStudio\14.0
So I would recommend trying this as you may be able to avoid uninstalling/reinstalling Visual Studio.
One more workaround for Visual Studio 2015 Update 1
- Open
c:\Users\{User_Name}\AppData\Local\Microsoft\VisualStudio\14.0\devenv.exe.config
- Change binding redirection for
System.Collections.Immutable
,newVersion
should be1.1.37.0
(not1.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.