Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
890 views
in Technique[技术] by (71.8m points)

visual-studio - 错误消息“未找到与约束合同名称匹配的导出”(Error message “No exports were found that match the constraint contract name”)

This morning I faced a problem while opening my Visual Studio solution, and when I tried to run it, it said:

(今天早上我在打开Visual Studio解决方案时遇到了问题,当我尝试运行它时,它说:)

No exports were found that match the constraint contract name

(未找到与约束合同名称匹配的导出)

How can I fix this problem?

(我该如何解决这个问题?)

  ask by Simon B.Robert translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

I solved this problem by clearing Visual Studio Component Model Cache.

(我通过清除Visual Studio组件模型缓存解决了这个问题。)

Just delete or rename this folder:

(只需删除或重命名此文件夹:)

%LocalAppData%MicrosoftVisualStudio11.0ComponentModelCache

or

(要么)

%LocalAppData%MicrosoftVPDExpress11.0ComponentModelCache

and restart Visual Studio.

(并重新启动Visual Studio。)

The version of Visual Studio you have is specified by the number eg

(您拥有的Visual Studio版本由数字指定,例如)

Visual Studio 2012 is 11.0 (as shown above)

(Visual Studio 2012是11.0 (如上所示))

Visual Studio 2013 is 12.0

(Visual Studio 2013是12.0)

Visual Studio 2015 is 14.0

(Visual Studio 2015是14.0)

Visual Studio 2017 is 15.0

(Visual Studio 2017是15.0)

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

(对于那些不知道的人: %LocalAppData%\C:\Users\{yourUsername}\AppData\Local)

For those who have multiple versions of Visual Studio installed, eg 2012 and 2013, it might help to remove the ComponentModelCache for both versions before restarting Visual Studio, eg 11.0 and 12.0.

(对于那些安装了多个Visual Studio版本的用户,例如2012和2013,在重新启动Visual Studio之前删除两个版本的ComponentModelCache可能会有所帮助,例如11.0和12.0。)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...