Different Versions of Telerik.Web.UI Assemblies in GAC lead to Theme not found

2 posts, 1 answers
  1. Bastian
    Bastian avatar
    1 posts
    Member since:
    Nov 2014

    Posted 24 Nov 2015 Link to this post

    Hello,

    we have a problem with using different Assembly Versions of the Telerik.Web.Ui.dll that are deployed in the Global Assembly Cache.

    We are getting the following reproducable error: 

    Telerik.Web.UI.RadFormDecorator with ID='RadFormDecorator1' was unable to find an embedded skin with the name 'Metro'. Please, make sure that the skin name is spelled correctly and that you have added a reference to the Telerik.Web.UI.Skins.dll assembly in your project. If you want to use a custom skin, set EnableEmbeddedSkins=false.

    The used versions are i.e: 2013.2.611.45 and 2015.1.225.45.

    • Scenario1: The first page that will be opened finds the Theme correctly. If we navigate to the second page, where the other Version of the Telerik dll is used, then the error with the Theme is thrown.
    • Scenario 2: If we navigate at first to the second Page (of course after a webapplication recycle), then this page works correctly and the first page throws the error.
    • Scenario 3: If the two pages are using the same Version of the Telerik.Web.Ui.DLL then no error will be thrown

    Do you know this behaviour and know how i can get this work?

    Thanks,

    Bastian John

  2. Answer
    Marin Bratanov
    Admin
    Marin Bratanov avatar
    3600 posts

    Posted 24 Nov 2015 Link to this post

    Hello Bastian John,

    A single application cannot reference different versions of the same assembly, and this is a general .NET limitation that applies to our controls as well.

    Thus, I advise that you ensure your app references a single version of the Telerik assemblies and that the Telerik.Web.UI.dll and Telerik.Web.UI.Skins.dll versions match.

    You can use a bindingRedirect element to forward requests for old versions to the current if you cannot remove all pointers to them (e.g., Register directives in user controls). Here is a basic example:

    <dependentAssembly>
        <assemblyIdentity name="Telerik.Web.UI" publicKeyToken="121fae78165ba3d4" />
        <bindingRedirect oldVersion="1.0.0.0-2015.1.225.45" newVersion="2015.1.225.45" />
    </dependentAssembly>

    I also advise that you review the following article on using the GAC because it also shows how GAC references look like which will help you ensure they are correct: http://docs.telerik.com/devtools/aspnet-ajax/deployment/using-the-global-assembly-cache.

    Regards,

    Marin Bratanov
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top