73
votes

When starting Visual Studio 2013 Pro (Update 4 installed) I very often get this error message (several times a day now) for the past about two weeks:

The 'Microsoft.VisualStudio.Editor.Implementation.EditorPackage' package did not load correctly.

I know I can correct this problem by closing Visual Studio and deleting:

%LocalAppData%\Microsoft\VisualStudio\12.0\ComponentModelCache

I have never seen it before that time and as far as I found out in the Internet it was possibly introduced with Update 3.

Well, the problem is that it is annoying to restart Visual Studio several times a day, and I was wondering if anyone else is experiencing this and knows how to solve it for good or what the cause is.

I noticed that it happens extremely often if I work in more than one instance of Visual Studio in parallel. This one is a killer. But still I suspect a third-party component to be involved or it is the size of one of the solutions (about 70 projects). I tried to deactivate some extensions I newly installed and need for the big project, but to no avail.

Just as information: I am working with C#. When working in parallel with projects open in several instances of Visual Studio I never had problems before.

Does anyone have the same problem to this extend or possibly have a better solution than deleting the folder and restarting?

3
Do you mean deleting the content of folder "ComponentModelCache" and "ComponentModelCache" ifself? Or just deleting the content of "ComponentModelCache" (leavning an empty folder)?Peter Mortensen
Thank you very much for the tip with %LocalAppData%\Microsoft\VisualStudio\12.0\ComponentModelCache (in my case, for Visual Studio 2012, it was %LocalAppData%\Microsoft\VisualStudio\11.0\ComponentModelCache). It fixed a crashing Visual Studio on an old imported Visual Studio 2008 solution. I deleted (actually, I moved it so it could be restored if necessary) the entire folder.Peter Mortensen
@PeterMortensen: I started moving the folder just like you to be safe. Now if I get the error nowadays I just delete the ComponentModelCache folder completely not just the contents.Uwe Hafner
I only have this problem with projects that use TypeScript. Maybe it's always TypeScript that causes this issue, I would like to hear from anyone else that can confirm. If we can narrow this down maybe we can get Microsoft to come up with a permanent fix.bikeman868
@bikeman868. Sorry. Can't confirm. I only use c#. No Web or Javascript back then when this issue happened really often. But I suspected some add-ons or libraries I was usually not using. But could not confirm that as well.Uwe Hafner

3 Answers

128
votes

This has become a popular question so I thought I add an explicit answer how to (at least) temporarily fix the problem as already stated in the question:

I stop Visual Studio and delete the following folder (completely, not just contents)

%LocalAppData%\Microsoft\VisualStudio\12.0\ComponentModelCache

If you are using VS2015, then the path should be:

%LocalAppData%\Microsoft\VisualStudio\14.0\ComponentModelCache

If you are using VS2017, then the path should be:

%LocalAppData%\Microsoft\VisualStudio\15.0\ComponentModelCache

I don't keep a backup of the folder. It is created automatically again when starting Visual Studio.

I have never found a solution how to permanently fix the problem in that working environment. In my new developing environment (new projects and new workplace) the problem never happens.

15
votes

This is what helped me... seemed to happen after Windows Server 2012 SP install...

https://connect.microsoft.com/VisualStudio/feedback/details/1123745/setsite-failed-for-package-microsoft-visualstudio-editor-implementation-editorpackage

  1. devenv /clearcache
  2. devenv /updateconfiguration
1
votes

In that case you can start Visual Studio setup again and choose the option showing two options, Repair and Uninstall. Then click Repair and when repair is done, restart the computer. Then the issue has been resolved.