Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2015 Community - 'Visual C++ Project System Package' error

So, I've been having this problem for a little while now. Frequently when I just try to open any of my projects I get the following error:

---------------------------
Microsoft Visual Studio
---------------------------
The 'Visual C++ Project System Package' package did not load correctly.



The problem may have been caused by a configuration change or by the
installation of another extension. You can get more information by examining the
file 'C:\Users\Q009\AppData\Roaming\Microsoft\VisualStudio\14.0\ActivityLog.xml'.



Restarting Visual Studio could help resolve this issue.



Continue to show this error message?

Opening the activity log reveals the following error:

SetSite failed for package [Visual C++ Project System Package][Object reference not set to an instance of an object.]:{ at Microsoft.VisualStudio.Project.VisualC.VCProjectEngine.VCProjectEngineShim.get_ProjectService() at Microsoft.VisualStudio.Project.VisualC.VCProjectEngine.VCProjectEngineShim.Initialize(IntPtr instResources, Object sp, Object browser, IVCBuildPackageInternal bldPkg)}

In order to 'solve' this I just go to AppData/Local/Microsoft and remove VisualStudio and VSCommon folders. This fixes it for a while allowing me to continue work on my projects. Until the issue randomly decides to come back again.

Again, to clarify the situation. It's not a migration problem or a problem with newly installed packages. I've had this setup for a while now and those projects were created using this very instance of Visual Studio.

like image 392
ImQ009 Avatar asked Mar 20 '16 13:03

ImQ009


1 Answers

I get the same error every now and then and not just with C++ projects. The solution varies, but most of the times It's done by deleting the files under the ComponentModelCache, as the comment by WhozCraig suggested:

rmdir /q /s %LOCALAPPDATA%\Microsoft\VisualStudio\14.0\ComponentModelCache

Update:

An extension now exists that clears ComponentCache for VS 2015, 2017, written by Mads Kristensen.

like image 153
Tarek Avatar answered Oct 17 '22 08:10

Tarek