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

后端 未结 23 1238
隐瞒了意图╮
隐瞒了意图╮ 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:12

    It's been a long time since this question was asked but if someone is still interested - I recently ran into similar icons. I was compiling a C#.net project using VS 2008. I found VS could not locate the assemblies for those references. When I double clicked VS refreshed the references and removed the icons on some of those[EDIT: which it could NOW locate]. For remaining references, I had to compile the respective assemblies.

    0 讨论(0)
  • 2020-11-30 18:12

    I had created a new .sln which was put in a subfolder. The .nuget folder was missing from where that .sln file was added. Moving the .nuget folder from the root into the subfolder where my new .sln file was solved the issue for me.

    I came back later and added the .sln file to the root and deleted the subfolder. Doing this originally would have solved the issue as well.

    0 讨论(0)
  • 2020-11-30 18:13

    Reinstall all packages in all projects of the current solution:

    Update-Package -Reinstall
    
    0 讨论(0)
  • 2020-11-30 18:13

    Check NETFramework of the referred dll & the Project where you are adding the DLL. Ex: DLL ==> supportedRuntime version="v4.0" Project ==> supportedRuntime version="v3.0"

    You will get warning icon. Solution : Make dll version consistence across.

    0 讨论(0)
  • 2020-11-30 18:19

    I had these icons for a different reason. We have one big solution for all our projects (nearly 100). I made a subselection of the projects I was interested in and made a new solution. However the references where project references instead of references to the compiled dll's....

    After some research I found this link on GitHub which explains this is new behaviour in VS2015.

    On the GitHub page they explain a workaround for converting project references to binary references.

    0 讨论(0)
  • 2020-11-30 18:21

    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.

    0 讨论(0)
提交回复
热议问题