Ueli Hofstetter
Ueli Hofstetter

Reputation: 2534

Visual Studio Error: The "Microsoft.VisualStudio.Editor.Implementation.EditorPackage" package did not load correctly

I tried to open a solution in visual studio and got the following error message: "The "Microsoft.VisualStudio.Editor.Implementation.EditorPackage" package did not load correctly". It also tells me to look into the log file... here are the (hopefully) relevant error entries from the log file (activity montior log):

194 ERROR Type provided must be an Enum. Parameter name: enumType
          C:\Users\uhofstetter\AppData\Local\Microsoft\VisualStudio\11.0\ComponentModelCache\Microsoft.VisualStudio.Default.cache   Microsoft.VisualStudio.CommonIDE.ExtensibilityHosting.VsShellComponentModelHost 2015/11/25 17:48:41.548 
195 ERROR An error occured while loading assembly cache from the cache file:
          C:\Users\uhofstetter\AppData\Local\Microsoft\VisualStudio\11.0\ComponentModelCache\Microsoft.VisualStudio.Default.cache   Microsoft.VisualStudio.CommonIDE.ExtensibilityHosting.VsShellComponentModelHost 2015/11/25 17:48:41.549 
196 ERROR Type provided must be an Enum. Parameter name: enumType
          C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO 11.0\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\EDITOR\Microsoft.VisualStudio.Platform.VSEditor.dll   Microsoft.VisualStudio.CommonIDE.ExtensibilityHosting.VsShellComponentModelHost 2015/11/25 17:48:41.552 
197 Warning Temporary turn off caching for this assembly for the current session of the application
          C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO 11.0\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\EDITOR\Microsoft.VisualStudio.Platform.VSEditor.dll   Microsoft.VisualStudio.CommonIDE.ExtensibilityHosting.VsShellComponentModelHost 2015/11/25 17:48:41.553 

...

235 ERROR SetSite failed for package [Microsoft.VisualStudio.Editor.Implementation.EditorPackage] {E269B994-EF71-4CE0-8BCD-581C217372E8} 80131500 VisualStudio 2015/11/25 17:49:20.531 
236 ERROR End package load [Microsoft.VisualStudio.Editor.Implementation.EditorPackage] {E269B994-EF71-4CE0-8BCD-581C217372E8} 80131500 VisualStudio 2015/11/25 17:49:20.551 

does anyone know what is going wrong here?

Btw: I am using Visual Studio Professional 2012

Upvotes: 21

Views: 18628

Answers (4)

R. Waugh
R. Waugh

Reputation: 103

the solutions that worked for everyone else

Which seems to be either deleting the folders at both:

C:\Users\your_username\AppData\Local\Microsoft\VisualStudio\version_number
// use the following to get to the proper directory for your user name 
// - much easier using windows special folders
%localappdata%\Microsoft\VisualStudio

and

C:\Users\your_username\AppData\Roaming\Microsoft\VisualStudio\version_number

or deleting/renaming

C:\Users\your_username\AppData\Local\Microsoft\VisualStudio\version_number\ComponentModelCache   ...

Was not enough for me. I had a error which popped up on attempting to load Python projects "0x80070570: The file or directory is corrupted and unreadable". If you have this issue running a disk check/repair and reboot followed by the above steps should work.

Upvotes: 2

Damian Kurek
Damian Kurek

Reputation: 180

I had that problem with Visual Studio 2022, and starting the app with administrator rights helped. I didn't need to delete the folder mentioned in the other answers.

Upvotes: 4

Frankenstein
Frankenstein

Reputation: 508

Have you tried to remove %LOCALAPPDATA%\Microsoft\VisualStudio\11.0\ComponentModelCache and restarting VS2012 / VS2013 may fix the problem

Upvotes: 49

Morphed
Morphed

Reputation: 3619

With VS2019 I had to:

  1. Remove all contents of C:\Users\{your_username}\AppData\Roaming\Microsoft\VisualStudio\*
  2. Remove C:\Users\{your_username}\AppData\Local\Microsoft\VisualStudio\16.0_xxxx\ComponentModelCache
  3. Restart Visual Studio as Admin, otherwise the folders weren't being recreated/repaired by Visual Studio.

Upvotes: 14

Related Questions