Loading SmartWebResources from GAC
As promised, the Service Pack 2 of WebUI Studio.NET 2008 is now available. You can download it from Developer Network portal. SP2 includes several new enhancements, and by far the most stable version that we ever release for 2008 R1 lifecycle. It’s highly recommended for existing customers and prospects to install and use SP2.
One of the enhancements in SP2 is the ability to use SmartWebResources feature in GAC scenario. As you may already aware, SmartWebResources is designed to reduce the resources dependencies during development and deployment. The resources are made up with Javascript files, images, stylesheets and other client files that might be needed by the component.
With its unique architecture, SmartWebResources is separated from the main assembly for security purpose, and for easy replacement. This way, developers can simply grab the new resources (which may contain updates or fixes) and replace the existing resources without making impact on the server side assemblies.
Recognizing the “plug and play” nature, the SmartWebResources are designed to be located in private bin of the Web application since the initial development. However, we have received numerous requests from customers who wanted to put the Resources assemblies in GAC (Global Assembly Cache) instead of in private bin folder. The reasons? There are several, some said they require all assemblies to be in GAC for easier product packaging, some said it is requirement due to the usage within SharePoint.
So, in this SP2, we manage to make it happen. Developers can now install the SmartWebResources to GAC during deployment, and still have the component to be able to locate them properly through settings in web.config. Several of new settings have been introduced to allow the main component to locate the Resource assembly, which is listed in the following:
<add key=“ISNet.WebUI.Resources.LoadFromGAC“ value=“true“/>
<add key=“ISNet.WebUI.Resources.FrameworkVersion“ value=“3.0.5000.112“/>
<add key=“ISNet.WebUI.Resources.WebGridVersion“ value=“6.0.7200.112“/>
<add key=“ISNet.WebUI.Resources.[OtherProductName]Version“ value=“[Major.Minor.Revision.Build]“/>
The LoadFromGAC key is an absolute requirement, which tells the WebUI.NET Framework to load SmartWebResources assembly from GAC.
The other keys are the version of each product which Resources should be look up from GAC. The FrameworkVersion is for the ISNet.WebUI.Resources.dll’s version. The other products are using [ProductName]Version pattern, for example, WebGridVersion, WebComboVersion, WebDesktopVersion and so on.
You might be wondering why the version need to be supplied for the Framework to load the assembly from GAC. The reason is that loading assembly from GAC require full assembly name format, and that the full assembly format should include the exact version of the assembly. While we can automatically detect the current running version of the main component assembly, customers may feel it is too strict since they may have several version of Resources, and may want to choose different set of Resources’ version.
So, that’s all for now. Hopefully you liked this new SP2 enhancement. By the way, we also have several new samples and important updates in SP2, make sure you check out SP2 Release Notes.
All the best,
Jimmy.
Thank you