当添加对MEF插件项目的引用时,为什么会出现警告图标? [英] Why do I get a warning icon when I add a reference to an MEF plugin project?
问题描述
我希望通过直接引用插件项目并实例化插件类来测试插件的核心类.创建测试Console App项目并将项目引用添加到插件项目时,在引用"列表中的引用旁边会出现一个警告图标(带有感叹号的黄色三角形).
I wish to test the core class of a plugin by directly referencing the plugin project and instantiating the plugin class. When I create a test Console App project and add a project reference to the plugin project, I get a warning icon (yellow triangle with exclamation mark) next to the reference in the References list.
当我改为添加对dll,插件的程序集构建输出的引用时,没有得到这样的警告.这个警告想告诉我什么?
When I instead add a reference to the dll, the assembly build output of the plugin, I get no such warning. What could this warning be trying to tell me?
推荐答案
如问题注释中所述,项目之间的不同.NET Framework版本可能导致此问题.检查新项目的属性,以确保未使用其他默认版本.
As mentioned in the question's comments, differing .NET Framework versions between the projects can cause this. Check your new project's properties to ensure that a different default version isn't being used.
这篇关于当添加对MEF插件项目的引用时,为什么会出现警告图标?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!