Copied to clipboard

Flag this post as spam?

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


  • Kyle 7 posts 77 karma points
    Feb 09, 2018 @ 16:13
    Kyle
    0

    UserControls & Different Versions of Same 3rd Party DLL

    Hello,

    I recently inherited a website that makes use of multiple .NET User Controls. A few of these controls are not working because they reference a different version of a 3rd party DLL than what is currently in the bin.

    Per instructions in this article, I've tried to modify the web.config file by adding a dependent assembly with bindingRedirect and codeBase elements to target each version and have come up empty handed (HttpParseException: could not load the assembly).

    <dependentAssembly>
        <assemblyIdentity name="Telerik.Web.UI" publicKeyToken="121fae78165ba3d4" culture="neutral" />
        <bindingRedirect oldVersion="2012.0.0.0-2012.2.815.40" newVersion="2012.2.815.40" />
        <bindingRedirect oldVersion="2013.0.0.0-2013.2.611.40" newVersion="2013.2.611.40" />
        <codeBase version="2012.2.815.40" href="bin/Telerik_Web_UI/v2012/Telerik.Web.UI.dll" />
        <codeBase version="2013.2.611.40" href="bin/Telerik_Web_UI/v2013/Telerik.Web.UI.dll" />
    </dependentAssembly>
    

    I've also tried giving a user control its own folder in the usercontrol directory of the site, with its own bin. Hoping that the control would know to use the DLL adjacent to it in the file structure. I get the same error as with previous effort.

    File structure for second effort

    We make use of numerous user controls and would rather not dedicate the resources to getting all of these controls using the same version of this assembly. Do you have any thoughts that may help us accomplish this?

    Thanks for your help, Kyle

Please Sign in or register to post replies

Write your reply to:

Draft