assembly reference problem

Topics: Troubleshooting, Writing modules
Nov 4, 2011 at 9:11 PM


We are trying to use a 3rd party assembly that has a reference to a specific version of ICSharpCode.SharpZipLib.dll.   The problem is that the Orchard.Media also contains a reference a different version of this assembly. When the Orchard runs both assemblies get copied to app_data\dependencies and one overwrites the other.   This causes runtime version reference issues.   Is there a good way to deal with this that someone has implemented?   I want to avoid the GAC at all costs.  Thoughts?

Nov 4, 2011 at 9:38 PM

SharpZipLib already comes with Orchard. The third party module should reference the version that is already there instead of packing its own.

Nov 4, 2011 at 9:41 PM

I understand it comes with it,  however we are not the owners of the third party library and cannot recompile it.  

Nov 4, 2011 at 9:50 PM

I imagine this is a problem that will come up now and again, and simple recompilation won't always be an option, e.g. if a specific library version has breaking changes that are for whatever reason hard to work around. How feasible would it be for example, for Orchard to copy into version-named folders in dependencies, or rename the dll to include an assembly version; can two dll versions exist alongside each other in the same application?

Nov 4, 2011 at 9:53 PM

I'm sorry, we do not want to have multiple versions of a dll running. You will have to work around this another way.