Note that there are some explanatory texts on larger screens.

plurals
  1. POC# plugin system binary compatibility issues
    primarykey
    data
    text
    <p>I've implemented a plugin system in .NET. The base library implements basic classes and interfaces exposed to plugins, the plugin libraries links the base library for using exposed classes and interfaces.</p> <p>The problem I'm facing is that a (simple) recompilation of the base library (with or without modifications) cause the plugins not able to being loaded, giving the exception message:</p> <pre><code> "Could not load file or assembly 'BaseLibrary, Version=0.0.1.68, Culture=neutral, PublicKeyToken=7b445b12e635292c' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)" </code></pre> <p>This problem is solved by compiling all at once the base library and the plugin libraries, but this is not very comfortable during development, since I modify base library quite frequently in this phase.</p> <p>If there any method to "relax" binary matching?</p> <p>Is it possible that the base library assembly information (quoted below) could be the casue of the problem?</p> <pre><code> [assembly: AssemblyVersion("0.0.1.*")] </code></pre> <p>I forgot to mention that assemblies are signed.</p> <hr> <p>Assemblies are loaded using the following routine</p> <pre><code>Assembly hLibrary = Assembly.LoadFile(pPath); Type plugImageCodecFactoryType = hLibrary.GetType("Derm.ImageCodecPluginFactory", true, false); object plugImageCodecFactory = Activator.CreateInstance(plugImageCodecFactoryType); object plugInstance; MethodInfo plugFactoryCreate = plugImageCodecFactoryType.GetMethod("CreatePlugin", BindingFlags.Instance|BindingFlags.Public); plugInstance = plugFactoryCreate.Invoke(plugImageCodecFactory, null); if (plugInstance is IImageCodecPlugin) RegisterPlugin((IImageCodecPlugin)plugInstance); </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload