We use log4net in all of our (many) in-house applications. We typically do what amounts to xcopy deployment. For developer convenience, we compiled the log4net source into one of our core libraries.
This is now coming back to bite us. Other open-source libraries (such as Topshelf) reference log4net. Still others (NServiceBus, for example) merge log4net into their assemblies. Usually the versions differ.
This is a general question; the specific libraries are just examples.
There are several similar questions:
- The located assembly's manifest definition does not match the assembly reference
- .Net picking wrong referenced assembly version
- How do I resolve ambiguity between my project DLL and a DLL in the GAC?
- .NET compiled third-party DLL reference conflict
Of the various solutions (GAC, assemblyBinding, bindingRedirect, etc.), what is likely to cause us the least pain in the future? We can modify our core library; we just can't do anything that would break an existing deployed version in the field. Updating all of our project references will be painful, so we only want to do this once.
Update: The current version of Topshelf abstracted logging, so this is no longer an issue with that framework.