Umbraco and log4net – Using two different versions of a DLL in ASP.net

If you ever need to use two different DLL versions because a third party SDK requires a later version of DLL which is required to run your application or Umbraco

Firstly download the DLLs you require and place them in a directory structure in the BIN folder as follows.

  • /bin/AcmeSDK/log4net.dll
  • /bin/umbraco/log4net.dll

Next remove any reference to the log4net.dll in any of the projects in the solution of the application.

Edit the Web.config to point to each assembly and version.

	<runtime>
        <assemblyIdentity name="log4net" publicKeyToken="669e0ddf0bb1aa2a" />
        <codeBase version="1.2.13.0" href="log4net/BazaarVoice/log4net.dll" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="log4net" publicKeyToken="null" />
        <codeBase version="1.2.11.0" href="log4net/Umbraco/log4net.dll" />
      </dependentAssembly>
		</assemblyBinding>
	</runtime>

 

 

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *