Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I fix the Microsoft Visual Studio error: "package did not load correctly"?

I started to see this on a fresh Windows and Visual Studio 2013 Ultimate with Update 2 installation (although others have also reported it on Updates 3 and 4, as well as the Professional version).

To resolve the problem, close all Visual Studio instances, then delete all files in the following folder:

Visual Studio 2013

%localappdata%\Microsoft\VisualStudio\12.0\ComponentModelCache

It worked fine for me. Thanks to this article.

Visual Studio 2015

%localappdata%\Microsoft\VisualStudio\14.0\ComponentModelCache

Visual Studio 2017

%localappdata%\Microsoft\VisualStudio\15.0_xxxx\ComponentModelCache

Visual Studio 2019

%localappdata%\Microsoft\VisualStudio\16_xxxx\ComponentModelCache

I encountered this problem in Visual Studio 2017 (15.7.4). After trying various solutions, eventually this worked for me: close all Visual Studio instances, and run this from the command line (possibly with administrator rights):

devenv.exe /clearcache
devenv /updateconfiguration

  • Close Visual Studio.

  • Backup and delete the following path:

    C:\Users\{your_username}\AppData\Roaming\Microsoft\VisualStudio\11.0

  • Restart Visual Studio as Admin. Otherwise, the Roaming folder can't be repaired by Visual Studio.


Try devenv /setup on the Visual Studio Command Prompt with administrative rights.

I had the same problem with Visual Studio 2013 Ultimate. I tried the solution by Reza posted here, but it didn't work.

Eventually I couldn't close Visual Studio. It was showing a similar dialog when I tried to close, and it wasn't closing. I tried this: Error message "No exports were found that match the constraint contract name". Neither.

I noticed a message in the Team Explorer window saying "Page 'somenumber' cannot be found". I tried that way, and I found this answer: Page '312e8a59-2712-48a1-863e-0ef4e67961fc' not found using Visual Studio 2012. So I run devenv /setup on the Visual Studio Command Prompt with administrative rights.

It did the job, and everything is fine now.