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

Problem

If you create a new module with Virto Commerce 3.x Module Templates - Visual Studio Marketplace, you can receive an error “No exports were found that match the constraint contract name”

image

Solutuon

Can be solved this problem by clearing Visual Studio Component Model Cache.

Just delete or rename this folder:

%LocalAppData%\Microsoft\VisualStudio\16.0\ComponentModelCache

or

%LocalAppData%\Microsoft\VPDExpress\16.0\ComponentModelCache

and restart Visual Studio.

The version of Visual Studio you have is specified by the number e.g.

Visual Studio 2012 is 11.0 (as shown above)

Visual Studio 2013 is 12.0

Visual Studio 2015 is 14.0

Visual Studio 2017 is 15.0

Visual Studio 2019 is 16.0

For those that don’t know: %LocalAppData%\ is the same as C:\Users\{yourUsername}\AppData\Local

Another Solutions

visual studio - Error message “No exports were found that match the constraint contract name” - Stack Overflow