C# DLL reference changes version and becomes unloadable (Plugin-system)

Posted by Kristoffer on Stack Overflow See other posts from Stack Overflow or by Kristoffer
Published on 2010-04-07T15:49:24Z Indexed on 2010/04/07 15:53 UTC
Read the original article Hit count: 337

Filed under:
|

I will try to keep this as simple as possible. I have a rather simple plugin system that has run into a problem.

I have 2 assemblies:

  • Host.exe
  • Plugin.dll

Plugin.dll references Host.exe (which contains interfaces and classes that Plugin.dll implement and use).

At runtime, Host.exe loads Plugin.dll through reflection and this works great. Except when Host.exe updates and gets a new version number. Then I get an error once I try to load Plugin.dll, saying that Host.exe (with the old version number) can't be found.

This means I have to rebuild all plugins every time Host.exe changes build number.

Anyone got a solution to this?

© Stack Overflow or respective owner

Related posts about c#

Related posts about plugin