This is a migrated thread and some comments may be shown as answers.

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

1 Answer 124 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Bastian
Top achievements
Rank 1
Bastian asked on 24 Nov 2015, 09:24 AM

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

1 Answer, 1 is accepted

Sort by
0
Accepted
Marin Bratanov
Telerik team
answered on 24 Nov 2015, 02:12 PM

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
Tags
General Discussions
Asked by
Bastian
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Share this question
or