Powered by Blogger.

Sunday, March 2, 2014

no exports were found that match the constraint contractname microsoft.visualstudio.text



Recently when one of my colleague trying to run a asp.net web site, she got the below error.

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




The project rebuild successfully but when run that time only the error was coming. Before going through the solutions you can check out my previous posts on:

- Difference between clustered index and non clustered index in sql server 2008

- Left outer join and Right outer join in SQL Server

- Stored Procedure tutorial in SQL Server 2008

Solution:
The below solution really worked for me, but I am not sure whether it is a right solution or not.

Open the below location and delete the files and folder presented inside.

Here bijay is the username of the computer.

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

After this hope the error will not come.