Error in Microsoft Visual Studio 2012 :No exports were found that match the constraint

拟墨画扇 提交于 2019-12-31 08:35:08

问题


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?


回答1:


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




回答2:


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.




回答3:


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.



来源:https://stackoverflow.com/questions/19217506/error-in-microsoft-visual-studio-2012-no-exports-were-found-that-match-the-cons

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!