Why do I get a warning icon when I add a reference to an MEF plugin project?

后端 未结 23 1464
隐瞒了意图╮
隐瞒了意图╮ 2020-11-30 17:30

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 p

23条回答
  •  眼角桃花
    2020-11-30 18:27

    Adding my 2 cents to the @kad81 answer,

    Go to Visual Studio -> BUILD -> Configuration Manager

    In the "Active Solution Platform" drop down in top right hand corner (mine is VS 2012), if it is "Mixed Platforms", change it to the appropriate platform based upon your reference third party assemblies.

    Then in each of the project in the list, make sure you select same platform for all the project. (if x86 not exist, then select "", then you can select "x86".)

    Rebuild the library projects first and then referencing projects. Hope this helps.

提交回复
热议问题