59

When I opened my Project in VS2012 , I got an error

No exports were found that match the constraint:

ContractName
Microsoft.VisualStudio.Utilities.IContentTypeRegistryService
RequiredTypeIdentity
Microsoft.VisualStudio.Utilities.IContentTypeRegistryService

Please correct before proceeding. (You might rename the current web.config and add a new one).

Why did this happen, can someone please suggest a solution?

Community
  • 1
  • 1
mottukutty
  • 687
  • 1
  • 7
  • 11
  • 3
    Here is the solution to this problem, [http://stackoverflow.com/questions/17596543/no-exports-were-found-that-match-the-constraint-contract-name][1] [1]: http://stackoverflow.com/questions/17596543/no-exports-were-found-that-match-the-constraint-contract-name – Asghar Jan 01 '14 at 23:16
  • 1
    exact duplicate of [Error message "No exports were found that match the constraint contract name"](https://stackoverflow.com/questions/17596543/error-message-no-exports-were-found-that-match-the-constraint-contract-name) – underscore_d Dec 28 '17 at 12:07

3 Answers3

158

I solved this problem by clearing the Visual Studio Component Model Cache. Just delete or rename this folder:

%AppData%\..\Local\Microsoft\VisualStudio\11.0\ComponentModelCache

Or, for Visual Studio 2013:

%AppData%\..\Local\Microsoft\VisualStudio\12.0\ComponentModelCache

Steffen Winkler
  • 2,805
  • 2
  • 35
  • 58
viru
  • 1,581
  • 1
  • 8
  • 2
14

I have fix this with update :

http://www.microsoft.com/en-in/download/confirmation.aspx?id=36020#

I'm on windows 8.1 and Visual Studio 2012.

Joffrey Hernandez
  • 1,809
  • 3
  • 21
  • 39
  • Just had this problem, tried your method, it worked, Thanks a lot :) +1 –  Mar 04 '14 at 00:23
13

I encountered similar issue and found this solution like magic. The steps go here:

  • Delete ComponentModelCache folder from below location:

C:\Users\\AppData\Local\Microsoft\VisualStudio\11.0

  • Make it sure to replace with your real user name on your pc.

  • Once deleted, recreate the folder with same name "ComponentModelCache".

  • In case, it gives any permissions issue, deleting the remaining files/folders one by one can work well.

The error is no more there when you try to create a project in visual studio.

Saima
  • 791
  • 1
  • 9
  • 13