Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 510
Ueli Hofstetter Avatar asked Nov 25 '15 18:11

Ueli Hofstetter


3 Answers

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

like image 195
Frankenstein Avatar answered Sep 25 '22 17:09

Frankenstein


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.
like image 28
Morphed Avatar answered Sep 23 '22 17:09

Morphed


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

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.

like image 37
R. Waugh Avatar answered Sep 21 '22 17:09

R. Waugh