简体   繁体   中英

Project to Project reference specific Version in same solution

I'm developing application that is plugable. The plugins are loaded via Assembly.LoadFrom(). In my solution I have 4 projects. A WPF, 2 DLL and another DLL that is a plugin for the app. The plugin project references one of the other DLLs.

When I build the Solution and run I was getting an error trying to use the plugin dll because it was expecting an older version of the referenced project. I had to clean and rebuild the plugin project to get it to run correctly.

So I assumed that specific version of the reference was set to true. But there is no specific version option in the properties window.

So now if I make changes to the referenced assembly and change version number I will have to clean and rebuild plugin as well even thought I did not change anything in that project. I can foresee that I will forget to do this step.

Is there a better way?

Would have expected

IPlugin - > Plugin

WPF -> IPlugin -> (LoadFrom Plugin)

That way they only time you should have to rebuild everything is if IPlugin changed

However you work it the consumer of what is being loaded in LoadFrom, should never depend on the implementation.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM