[Solved-5 Solutions] Error message “No exports were found that match the constraint contract name”



Error Description:

    • We face a problem while opening a Visual Studio solution, and when we try to run it, it will say:

    No exports were found that match the constraint contract name

    Solution 1:

    • We can solve this problem by clearing Visual Studio Component Model Cache.
    • Just delete or rename this folder:
    %LocalAppData%\Microsoft\VisualStudio\11.0\ComponentModelCache
    
    click below button to copy the code. By - visual studio tutorial - team
    • or
    %LocalAppData%\Microsoft\VPDExpress\11.0\ComponentModelCache
    
    click below button to copy the code. By - visual studio tutorial - team

    Solution 2:

    • We can run devenv /setup on the VS Command Prompt with administrative rights.

    Solution 3:

    • We can go to 'Programs and Features' and use the change button to startup the Visual Studio 2013 setup.
    • In the setup we need to choose the repair function and that will fix the problem.

    Solution 4:

    • This issue is because of a MEF cache corruption. Installing the feedback extension (or installing any extension) will invalidate the cache causing VS to rebuild it.

    Solution 5:

    • Delete the entire C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\DNX directory.
    • Delete the C:\Users\\AppData\Local\Microsoft\VisualStudio\14.0\devenv.exe.config file.
    • Run the Developer Command Prompt for VS2015 as the Administrator, and execute the devenv /setup command. The new devenv.exe.config file is generated. This time there are many assemblies that refer to the
    • C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\DotNet directory.
    • Run the VS 2015 and check that it shows the Microsoft .NET Core Tools (Preview 2) 14.1.20624.0 in the Help => About Microsoft Visual Studio menu.

    Related Searches to Error message “No exports were found that match the constraint contract name”