Assembly version redirection

Here’s how to redirect an assembly reference from one version (or version interval) to another:

    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
        <assemblyIdentity name="log4net" publicKeyToken="b32731d11ce58905" culture="neutral" />
        <bindingRedirect oldVersion="" newVersion=""/>

Note that for this to work, put it as early in your config file as possible since it must occur before the assemblies are referenced. Also note that both the new and old version of the assembly must have the same public key token, if they don’t you’ll get a System.IO.FileNotFoundException during binding.


Leave a Reply

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

Time limit is exhausted. Please reload CAPTCHA.

This site uses Akismet to reduce spam. Learn how your comment data is processed.