Separate Skin Assembly in RadControls for ASP.NET AJAX with Q3'11

Tuesday, November 15, 2011 by ASP.NET AJAX Team | Comments 23

Probably all of us have identified at some point the following trend in software development — newer version usually means bigger assemblies. Sure, some of the new stuff is features that we use on a daily basis; but some of the new stuff is just eye candy that we don't always use.

In fact, wouldn't it be nice if we could get just the software with the default looks; get the job done then and, if needed, add that sweet UI candy to it later?

And in order to tackle this problem — maintain a reasonable file size of the main Telerik AJAX assembly (Telerik.Web.UI.dll) while having pluggable eye candy — we've decided to introduce a separate assembly just for Rad AJAX Controls skins, namely the Telerik.Web.UI.Skins.dll.

We first shipped the assembly as a part of the official Q2 2011 release and some of you may have already noticed it. It contained just the four new skins added with Q2 2011 — Transparent, Office2010Black, Office2010Blue and Office2010Silver.

As of Q3 2011, all existing skins, except Default, are moved to the skins assembly. By doing so, we were able to shave few megs off the main assembly and transfer that load to the skins assembly (see screenshot below). And though 6 megs might seem modest for some, it's some 40% reduction in terms of the file size.

Comparison between the old assembly and new assembly

In addition, we'll put all new skins in the skins assembly, keeping the main assembly trim.

If you need to use any of embedded skins other than the Default one, all you need to do is add a valid reference to the new skins assembly in your project. You won't need to register this additional dll explicitly on your pages. Instead, simply copy it and reference it either from the /bin folder of your project (see the screenshot below) or the Global Assembly Cache (GAC).

The new Skins assembly placed in the /bin folder

Note: if you don't intend to use a skin other than Default or you have your own custom skins, you do not need to copy and reference the skins assembly at all. By not copying / referencing the skins assembly, only the main assembly will be loaded in the memory, thus achieving some memory optimization gains.

We know there is room for more improvements in that area — like reusing more of the resources, trimming down script and style files ... and why not having a way to build and deploy just the skin / skins you need. We know it and we'll get there. But to get there, we needed to make this seemingly small, yet important first step — introduce a separate skin assembly.

About the author

Ivan Zhekov

Ivan Zhekov

Ivan is a front-end developer at one of Telerik’s ASP.NET AJAX teams. He’s a self-taught, code-by-hand developer who enjoys twisted language constructs and language abuse above all. He’s primarily fluent in Bulgarian and English, but has strong knowledge in HTML, CSS and JavaScript. He tries to have minimalistic approach to development and ambient way of living. He’s not modest, that’s for sure, but he compensates with vast experience and a wicked sense of humor.

23 Comments

  • Richard Orchard 15 Nov 2011
    i would love smaller script sizes!
  • Brandon 17 Nov 2011
    This is great news, however, all of the sudden my existing project (which I just updated to the latest version of the controls) is unable to locate the embedded skins even after I added the reference to the new Telerik.Web.UI.Skins.dll. Is there another reference that I need to change?
  • ray 18 Nov 2011
    Why is there no testing of any of this stuff!!
    Skins file missing from release!!!
  • Ivan 18 Nov 2011
    Brandon,
    That's quite unusual behaviour. The skins should work right away. Could you open a support ticket , so we could look into your case in detail.
  • Ivan 18 Nov 2011
    Ray,
    I can assure you, we do test not only our code, but our skins as well. Could you elaborate on what's missing?
  • Shawn Clabough 19 Nov 2011
    I think he means when you add a control to a project, it only copies the telerik.web.ui.dll file into the project, and not the telerik.web.ui.skins.dll file.  I had to go get a copy from C:\Program Files\Telerik\RadControls for ASP.NET AJAX Q3 2011\Bin40 and add it to my project.  After adding the reference, it also wouldn't recognize the skins until I closed the project and reopened it.
  • Shawn Clabough 19 Nov 2011
    It would be good if on the control's flyout, there was some kind of tip that gives people a clue that other skins are included that just need to be added to the project.  I only found out about the because I had to spend time searching for why I was only seeing the default skin after upgrading a project from Q2.
  • Ric Pullen 23 Nov 2011
    I concur with Shawn, could you update the blog and help files that indicate "all you have to do is add a reference", actually no you need to close the project and reopen it on old projects. (not sure about new ones)  I had the same issue, and spent the best part of 30 minutes trying to work out why it wasn't working as expected.
  • Ric Pullen 23 Nov 2011
    I concur with Shawn, could you update the blog and help files that indicate "all you have to do is add a reference", actually no you need to close the project and reopen it on old projects. (not sure about new ones)  I had the same issue, and spent the best part of 30 minutes trying to work out why it wasn't working as expected.
  • Stefan Rahnev 23 Nov 2011
    We sincerely apologize for the trouble, Shawn/Pic. Some fixes concerning the design-time support for skins are integrated in the latest internal build (available for download), you can try it out. We will also attempt to bypass the requirement to reload the project in order to reference the skins assembly. Until then you will need to do that manually.
  • Walter Hoban 25 Nov 2011
    Well I just updated to Q3 11.15 after after much effort and several hours of just trying to get my project to update to the latest controls due to toolbox configurator not working, crashing VS, I finally got my project to load. And now the Skins issue, I have added a reference \  closed the project and reopened, I had to restart VS 2010 to get it to work. 
    This type of issue needs to be put some where more visible then finding the solutions in a comments of the Telerik blog. 
    I seem to run into different issues with each upgrade so I pretty much prepare myself for the several hours of agony to update all my projects. 
    On a positive note I still love using the controls  (once I get past all the upgrade issues) and would not hesitiate recommend them to other.
  • Adrian 28 Nov 2011
    Guys, really frustrating only finding this issue searching in google. Also please see that Telerik.Web.UI.Skins.dll is not registered in GAC. So manually adding a dll with hard linking to file store working in a multi team environment with source control is not a nice solution.
  • Jorge 07 Dec 2011
    I've also upgraded to latest release and the skins.dll is missing, can't find it anywhere and my site is crashing due to not able to find skins.
    Telerik.Web.UI.RadGrid with ID=RadGrid1 was unable to find embedded skin with name Windows7
    Lesson learned, do not accept automated upgrades!
  • Stefan Rahnev 07 Dec 2011
    Jorge, the automated AJAX upgrade wizard should include the new skins dll when you migrate from an older version of our AJAX components. Also review the information from this sticky forum post for reference:
    http://www.telerik.com/community/forums/aspnet-ajax/general-discussions/separate-skin-assembly-in-radcontrols-for-asp-net-ajax-with-q3-2011.aspx
  • Jorge 07 Dec 2011
    ok, I was able to make it work. The issue was that I shouldn't just accept "update". first I must download and install the new version and then go through the update wizard.
    btw, I love telerik controls, just hate when have technical issues :)
  • David O'Leary 22 Dec 2011
    Great. It's a start. Long way to go still. The size of your assemblies, js, and stylesheets has truly gotten obnoxious. Glad to here there is a new focus on this.
  • Netflash 23 Dec 2011
    I remember when we had a folder with the skins we needed to use. Then Telerik decided to join everything in a fat nice dll. With this Q3 you are separating the skins to another dll. Less fat, but still fat. Now you say that maybe there will be a dll for each skin.... Jesus, why do you keep wasting time on these things, and keep breanking our code?! Go back to Skin folders and let us (yes we a have a brain) decide wich folders to include in our projects.
  • Stefan Rahnev 04 Jan 2012
    Netflash, I cannot say where you read that there might be a separate dll for each skin, but we chose not have individual dlls due to the reason explained in the comments section of the previous blog post linked in this one.
    Indeed the introduction of the AJAX skins dll is a breaking change, but this is the only way to fulfill the common request for reduced main Telerik.Web.UI dlls size.
  • Scott Kilgore 19 Jan 2012
    I just downloaded a fresh copy of the Telerik AJAX controls and successfully added a TreeView.  I copied the skins dll to my bin folder, added a reference, and restarted VS, however I still do not see a list of skins in the dropdown list in the Properties window.  Everything I read says to just add the dll, add the reference, and restart VS.  What am I missing?
  • lini 20 Jan 2012
    If possible, please open a support ticket and send us a sample project we can examine.
    If it is a web site, then copying the Telerik.Web.UI.Skins.dll to the bin folder is enough. If it is a web application, then you need to add a reference to the skin assembly alongside Telerik.Web.UI.dll and rebuild your project to make sure that everything is in the bin folder. If even restarting VS does not help, you should look at the Telerik.Web.UI.dll and Telerik.Web.UI.Skins.dll and make sure they have the exact same version.
  • Scott Kilgore 20 Jan 2012
    Thanks very much for responding.  I resolved the problem by manually deleting all the DLLs from all the projects in the solution, and rebuilding.
  • Julio 27 Jan 2012
    I copy the BIN directory Telerik.web.ui.skins.dll and running the project gives the erroragain. As I can fix this? 
  • Vered 01 Feb 2012
    I've just upgraed to the lateset release - v.2011.3.1305.35.
    The file Telerik.Web.UI.Skins.dll  is NOT present on my pc, nowhere. This is the only pc I'm currently working on, there's no network. I went through the link and instructions you provided here, but the file is simply not present. What should I do?

Add comment

  1. Formatting options
       
     
     
     
     
       
  2. (optional, emails won't be shown on public pages)
  3. (optional)