"No exports were found that match the constraint" Error creating a new project - by LV_Programmer

Status : 

  Not Reproducible<br /><br />
		The product team could not reproduce this item with the description and steps provided.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.


13
0
Sign in
to vote
ID 742469 Comments
Status Closed Workarounds
Type Bug Repros 9
Opened 5/17/2012 2:19:06 AM
Access Restriction Public
Moderator Decision Sent to Engineering Team for consideration

Description

When you try to make a new project, Microsoft Visual Studio show a error form with the message "No exports were found that match the constraint: 
ContractName 
Microsoft.VisualStudio.Text.ITextDocumentFactoryService 
RequiredTypeIdentity
Microsoft.VisualStudio.Text.ITextDocumentFactoryService
Sign in to post a comment.
Posted by Bebins on 7/22/2015 at 2:23 AM
Hi all,
I experienced the same...
Recently i installed node.js for visual studion 2013
after taht when i tried to create new project it says the following error,

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

I fixed the above issue by renaming one of the folder in below two

C:\Users\[Your Username]\AppData\Local\Microsoft\VisualStudio\12.0
C:\Users\[Your Username]\AppData\Roaming\Microsoft\VisualStudio\12.0

I renamed the first one from 12.0 to 13.0
My problem solved now.

Happy coding!!!!
Posted by GV237 on 4/13/2015 at 9:41 AM
I experienced the same problem.

Removing (renaming) this two folders solved the problem.

C:\Users\[Your Username]\AppData\Local\Microsoft\VisualStudio\12.0
C:\Users\[Your Username]\AppData\Roaming\Microsoft\VisualStudio\12.0
Posted by George Xifaras (CTO - spire.net) on 1/1/2015 at 10:03 AM
Hi all,
     I had a similar issue with the "No exports were found that match the constraint:" error. It was on a laptop that powered off during the Visual Studio 2013 install process. I tried all the suggested fixes in a few articles and it did not resolve this issue. I decided to enable the disabled Administrator account and run Visual Studio 2013 with update 4. It worked properly under the Administrator account. That led me to conclude the profile was corrupted. I went under the following folders and deleted all the files/folder in the following paths:

C:\Users\[Your Username]\AppData\Local\Microsoft\VisualStudio\12.0
C:\Users\[Your Username]\AppData\Roaming\Microsoft\VisualStudio\12.0

Everything worked after I did that.
Good luck!
Posted by DanTheManXX on 9/4/2014 at 12:30 PM
Hi I am getting this issue with VS2013 Update 3 on WIn2012R2 VM
Update for Microsoft Visual Studio 2012 (KB2781514) - not applicable (when I tried to run it)
Security Update for Microsoft.NET framework 4.5 (KB2840642) - not found in update history
Ran windows update and noticed that there is Update for Microsoft Visual Studio 2013 Update 1 (KB2932965)
After a long time as there were quite a few updates, as well as the above ..... the issue is now fixed.
Posted by Awinesh Kumar on 6/17/2014 at 8:54 AM
install this update to fix it
Update for Microsoft Visual Studio 2012 (KB2781514)
http://www.microsoft.com/en-us/download/details.aspx?id=36020
Posted by LogiRush on 7/22/2013 at 8:28 AM
I traced this problem to the following windows update
Security Update for Microsoft.NET framework 4.5 (KB2840642)

Uninstall this update and the error should go away.
Posted by LogiRush on 7/17/2013 at 2:48 PM
I installed a large number of updates via Windows Update on July 15, around 100 updates. Afterwards I my VS 2012 application exhibited an error "ImportCardinalityMismatchException was unhandled by user code", "No exports were found that match the constraint." The same codebase works for everyone else in the department who (as best as I can tell) have not installed windows update recently. This could be related to Microsoft.Practices.EnterpriseLibrary, but I'm using the same version that worked previously.

Installing KB2781514 did not fix the problem.
Uninstalling VS 2012 and reinstalling did not fix the problem.
Installing VS 2013 update 3 did not fix the problem.
Deleting the ComponentModelCache folder at D:\Users\{username}\AppData\Local\Microsoft\VisualStudio\11.0 did not fix the problem.

At this point I'm going to have to re-image my system with a clean OS.

I don't know what happened....it could be my error, or it could have been something related to the Windows update. I'm just mentioning this in case someone else experiences the same issue.
Posted by JohnFarren on 7/16/2013 at 6:46 AM
I just installed a number of required MS security patches (per comany policy), and it corrupts the Visual Studio installation. The only solution is to reinstall. You really should test your products with your security patches. That is just basic QA...
Posted by Microsoft on 5/28/2012 at 12:02 AM

Hi, given that we have not heard back from you in these days. We will go ahead and close this Connect Issue. If you get a chance to review and provide the information requested earlier, you can go ahead and reactivate this issue.
Posted by Microsoft on 5/25/2012 at 2:40 AM
Hello again. We wanted to give you a quick reminder that to efficiently investigate and reproduce your issue, we need you to submit the additional information we requested . If we haven't heard back from you with the requested information in the next 3 days, we will go ahead and close the issue.
Posted by Microsoft on 5/22/2012 at 11:21 PM
You can download a Visual Studio 2010 Diagnostic Tool from http://visualstudiogallery.msdn.microsoft.com/en-us/e8649e35-26b1-4e73-b427-c2886a0705f4. You can get detailed description about how to use it to collect dump file.

Posted by LV_Programmer on 5/21/2012 at 2:17 PM
On the 7 step the visual studio crash and it need to restart. I cant do it.
I downloaded the visual studio 11 beta and the problem persists. Can i try the steps with it?
Thank you for the support.
Posted by MS-Moderator07 [Feedback Moderator] on 5/17/2012 at 10:21 PM
Thanks for your feedback. In order to efficiently investigate and reproduce this issue, we are requesting additional information outlined below.

It may help if you provide us with a dump file and call stack.


1. Start Visual Studio

2. go to Tools | Options | Debugging
- Enable ".NET Framework source stepping"
- Enable "Source Server support"
- Enable "Step over properties and operators (Managed only)"
- Disable "Enable Just My Code"

3. Start another instance of VS in order to repro the issue.
4. In the first instance click Tools | Attach to Process...
5. In the list of processes locate devenv.exe.
6. Click Select... and explicitly choose 'Native' and 'Managed V4.0' code.
7. Click OK and OK to close Select dialog and Attach to Process dialog.
8. Try to reproduce this issue. When you exception happen, go to the first instance of VS, click Debug, save the full dump file.

************************************************************
Please zip the file and use "FeedbackID-742469" as prefix of the file name.

************************************************************
You can use the following workspace to upload the file:
https://sftus.one.microsoft.com/choosetransfer.aspx?key=e940bbc1-e291-47cb-98f9-98ba70ce9554
Password is TyDSc*u3LZB

Thanks again for your efforts and we look forward to hearing from you.

Microsoft Visual Studio Connect Support Team
Posted by MS-Moderator01 on 5/17/2012 at 2:45 AM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)