Copied to clipboard

Flag this post as spam?

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


  • Damien Green 72 posts 134 karma points
    Jun 13, 2015 @ 10:04
    Damien Green
    0

    Dll version conflict with 3rd party library

    Hi Guys,

    I'm currently developing a web application that uses the latest version of Umbraco (7.2) and a third party library. The problem is that my 3rd party library requires Cook Computing XML RPC V3.0 whereas Umbraco requires V2.5.

    At runtime, the third party library dll which is automatically copied into the application's bin directory locates the 2.5 dll and raises an assembly load failure.

    This application is to work on shared hosting, so I will have no access to the GAC (which is how I'd usually resolve this issue).

    Do anyone know of an alternative workaround, does Umbraco ship with any inbuilt functionality to resolve this issue?

    Many thanks,

    Damien

  • Kevin Jump 2343 posts 14890 karma points MVP 8x c-trib
    Jun 13, 2015 @ 12:13
    Kevin Jump
    0

    Hi,

    you might be able to get around this in the web.config using a dependantAssembly / codebase hint http://stackoverflow.com/questions/7040432/set-location-of-dlls-to-load-in-web-config

    inside the <assemblyBinding> section of the webconfig you can add a <codeBase> element to the dependant assembly. that allows you to have multiple versions of the same dll in the solution.

    the CookComputing reference isn't in the web.config but i think you can add it.

    <dependentAssembly>
                <assemblyIdentity name="CookComputing.XmlRpcV2" publicKeyToken="a7d6e17aa302004d" />
                <codeBase version="2.5.0.0" href="bin\CookComputing.XmlRpcV2.dll" />
                <codeBase version="3.0.0.0" href="bin\app\CookComputing.XmlRpcV2.dll" />
    </dependentAssembly>
    

    and put the one you app needs in the app folder (although you can call this anything).
    (i am not sure about that public key token)

  • Damien Green 72 posts 134 karma points
    Jun 24, 2015 @ 16:53
    Damien Green
    0

    Hi Kevin,

    My apologies for the late reply, I've been busy on other projects so haven't had the time to take another look at this until today.

    I've just tested your solution and it works perfectly, thank you very much for this! I was working on something down similar lines, but your example is much better than others I have found on line and you also took the trouble to write the config file section for me.

    My thanks once again,

    Damien

Please Sign in or register to post replies

Write your reply to:

Draft