错误:未找到与约束匹配的导出:

use*_*989 5 c# attributes mef waf

我正在建立一个WAF项目.当我调试我的项目.我很喜欢这个问题

"The composition produced a single composition error. The root cause is provided below.
 Review the CompositionException.Errors property for more detailed information.\r\n\r\n1) 
 No exports were found that match the constraint: \n\tContractName\tWaf.InformationManager.OneNote.Modules.Applications.Views.INoteView\n\t
 RequiredTypeIdentity\tWaf.InformationManager.OneNote.Modules.Applications.Views.INoteView\r\n"
Run Code Online (Sandbox Code Playgroud)

我该如何解决这个问题?

我解决了我的问题(感谢sgrassie)我没有创建一个NoteView.xaml(它实现了INoteView并在类头中添加[Export(typeof(INoteView)])

Stu*_*sie 6

您缺少[Export(typeof(INoteView)]实现 的类的属性INoteView。