Skip to main content

No exports were found that match the constraint: ContractName Microsoft.VisualStudio

Today morning when I opened one of my projects in Visual Studio 2012, I got mentioned below error:
“No exports were found that match the constraint: ContractName Microsoft.VisualStudio.Utilities.IContentTypeRegistryService RequiredTypeIdentity Microsoft.VisualStudio.Utilities.IContentTypeRegistryServicePlease correct before proceeding. (You might rename the current web.config and add a new one).”

Reason:
It seems error occur when the .NET 4.5 framework is updated via recent windows 7 updates.

Solution:
I resolved this issue by removing the files inside the Visual Studio Component Model Cache folder at this specific location for Visual Studio 2012.
C:\Users\{username}\AppData\Local\Microsoft\VisualStudio\11.0\ComponentModelCache

If you facing this issue with Visual Studio 2010 then the relevant location is:
C:\Users\{username}\AppData\Local\Microsoft\VisualStudio\10.0\ComponentModelCache

Or if you facing this issue with Visual Studio 2013 then the relevant location is:
C:\Users\{username}\AppData\Local\Microsoft\VisualStudio\12.0\ComponentModelCache

Note:
If still that not fix the issue I believe you need to install the Microsoft update for MicrosoftVisual Studio 2012 – KB2781514, and I hope that will fix the issue.

Comments

Post a Comment