This morning I faced a problem while opening my Visual Studio solution, and when I tried to run it, it said:
No exports were found that match the constraint contract name
How can I fix this problem?
This morning I faced a problem while opening my Visual Studio solution, and when I tried to run it, it said:
No exports were found that match the constraint contract name
How can I fix this problem?
This issue is because of a MEF cache corruption. Installing the feedback extension (or installing any extension) will invalidate the cache causing VS to rebuild it.
click for source.
This issue can be resolved by deleting or clearing all the folders and files from
%AppData%\..\Local\Microsoft\VisualStudio\11.0\ComponentModelCache
This actually clears the Visual Studio component model cache.
On Windows 7 machines, the path is different. When you type
%appdata%
in Run dialog, it opens the folderC:\Users\<username>\AppData\Roaming
.Click the 'up' button to navigate to the parent folder and select the folder 'Local'.
Final path:
C:\Users\<username>\AppData\Local\Microsoft\VisualStudio\11.0\ComponentModelCache
I had to uninstall some external components like Postsharp and Apex and then it worked. I also tried the chosen solution but it gave me more errors.
I had the same problem with Visual Studio Express 2013 of Windows 8.1.
Unfortunatly there was no "ComponentModelCache" folder in
%AppData%..\Local\Microsoft\VisualStudio\12.0\ComponentModelCache.
I found the "ComponentModelCache" folder in
..\Users[username]\AppData\Local\Microsoft\WDExpress\12.0
and solved this problem by removing this folder from there.
Remove ComponentModelCache folder content.
Visual Studio Express 2012 has different paths.
Visual Studio Express
With Visual Studio Express 2012 for Web
I did not have to re-install Visual Studio Express