Reputation: 445
I am using Visual Studio 2013 on Windows 10, Today I am getting error "No exports were found that match the constraint:"
I did following but still having same issue:
by removing/renaming "ComponentModelCache" folder, but still problem.
Run VS Repair, but still having same problem.
Finally, I Uninstalled Visual Studio 2013 and reinstalled, but still having same problem.
Please suggest what do do now?
Upvotes: 1
Views: 9131
Reputation: 1
Apologies for contributing to an old "answered" thread. however for me, using Win 10, VS 2013. I had to remove the 'ComponentModelCache' folder from each version of VS that I had installed before this issue was resolved.
Upvotes: 0
Reputation: 39
You can see here more solutions which require deleting the cache in %APPDATA%.
In my case, the problem was that I was initializing and using class with the MEF framework but didn't declare the class as a MEF class.
How to import a MEF class:
[Import(typeof(ICalculator))]
public ICalculator calculator;
How to define and export a MEF class:
public interface ICalculator
{
String Calculate(String input);
}
[Export(typeof(ICalculator))]
class MySimpleCalculator : ICalculator
{
}
The code example is taken from here
Upvotes: 1
Reputation: 445
Finally, I did find answer myself, instead of deleting/renaming 'ComponentModelCache' folder in path C:\Users\'username'\AppData\local\Microsoft\VisualStudio\12.0
I renamed folder 'Microsoft' in path C:\Users\'username'\AppData\local\
This works for me.
Upvotes: 1