Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Dave de Moel 122 posts 574 karma points c-trib
    Oct 27, 2015 @ 11:30
    Dave de Moel
    0

    Using a newer version of log4net

    For a client I need to develop a custom section where they can upload a specific excel file and then I need to read it and do some stuff with it. For this reason I want to use LinqToExcel, a great package that lets me easily read an excel file s if it were a database table.

    However I am running into a problem. LinqToExcel has a dependency for log4net 1.2.13.0 while Umbraco uses log4net 1.2.11.0

    Normally you can point older dependencies to use a newer version using a assembly binding, however there is none for log4net in the web.config, and creating one manually also doesn't seem to work.

    Below is the error I am getting. Is there a way to use another version of log4net that I am just missing? Or is the version Umbraco.Core needs somehow hardcoded? rip errror

  • Ismail Mayat 4511 posts 10090 karma points MVP 2x admin c-trib
    Oct 27, 2015 @ 11:41
    Ismail Mayat
    100

    Dave,

    you will need todo binding assembly redirect

      <!-- Log4Net (Diff versions)-->
      <dependentAssembly>
        <assemblyIdentity name="log4net" />
        <codeBase version="1.2.11.0" href="bin/Dependencies/log4net.1.2.11.0.dll" />
      </dependentAssembly>
    

    so you will need so will need to rename one of the log4net dlls then add reference to it in your project and in visual studio set to copy local.

    So you can then have 2 log4net dlls

  • Dave de Moel 122 posts 574 karma points c-trib
    Oct 29, 2015 @ 09:10
    Dave de Moel
    0

    Too bad I have to do this as a workaround, but it worked. Thanks.

Please Sign in or register to post replies

Write your reply to:

Draft