Telerik blogs
Some time ago a client of ours asked us whether he can use the Telerik CAB Enabling Kit with ClickOnce. Although we have a KB article on how to deploy the WinForms suite with ClickOnce, we do not have explicit instructions on doing this with the Telerik CAB Enabling Kit. So, here they are.

Applications built with CAB have always caused problems when it is time to deploy them with ClickOnce. Applications built with the Telerik CAB Enabling Kit or (TCEK for short) are no different. Why this is considered such a painful task?
Well, to most extent because CAB uses special techniques to allow extended separation of concerns (or in other words dependency injection to allow the referencing of business and foundational modules via ObjectBuilder). It allows application modules to be developed in isolation from each other and allows applications to be extended via a plug-in style architecture.
This is great on paper, however it makes deployment with ClickOnce in Visual Studio 2005 a difficult process. ClickOnce publishing uses reflection within Visual Studio to determine module dependencies and assembly references so that applications can be packaged and deployed easily. While this approach works most of the time, CAB modules are not referenced directly in applications and cannot use the ClickOnce publishing feature directly.
That is why some extra steps must be performed to prepare an application built with TCEK for ClickOnce deployment. These steps involve using a utility named Mage and are described in the following list:
  1. In Visual Studio, publish the shell application.
  2. Copy the modules that will be dynamically loaded into the shell to the publish folder, and then add .deploy file name extensions to them.
  3. Run Mageui.exe and update the application manifest to include the modules and any associated file resources.
  4. Save and sign the application manifest.
  5. In Mage, open the deployment manifest, and then refresh the application manifest reference.
  6. Save and sign the deployment manifest.
  7. Provide a URL to the deployment manifest to your users.
In the latest SCSF form May 2007 the guys from the Patterns & Practices team at Microsoft have taken some steps to make the process easier with Manifest Manager Utility.

The following list describes the steps to be performed if you have this utility available:
  1. In Visual Studio, publish the shell application.
  2. Open the Manifest Manager Utility, and then open the deployment manifest.
  3. Select the additional files you need to add to the application.
  4. Save the manifests.
  5. Provide your users with a URL to the deployment manifest.
I will demonstrate the suggested approach using the Finance Application form the TCEK Beta1 release.

To publish the application from Visual Studio


  1. Expand the Infrastructure solution folder.
  2. Right-click Shell , and then click Publish .
  3. Click Finish to accept the default settings.




The project will be built and published to the location set on the Publish tab of the project properties page (C:\TEMP\Shell).

To add the additional modules using the Manifest Manager Utility

  1. Run the ManifestManagerUtility.exe utility.
  2. On the File menu, click Open .
  3. Browse to and select the published deployment manifest. The commonly modified values from the deployment manifest and the list of files from the referenced application manifest will be loaded into the utility (see Figure 1).


  1. On the Edit menu, click Add Files .
  2. Navigate to the build output folder for the FinanceApplicationCAB solution.
  3. In the Add Application Files dialog box, select the following files to add them to the application manifest, and then click Open :
    • Infrastructure.Module.dll
    • Infrastructure.Layout.dll
    • Telerik.Charting.dll
    • Telerik.WinControls.RadChart.dll
    • Telerik.WinControls.GridView.dll
    • Equity.xml
    • Views\StockNewsView\ RssTransform.xslt
  4. On the File menu, click Save .
  5. In the Select Publisher Certificate to Sign Manifest dialog box, click Browse , and then navigate to the publisher certificate that was generated by Visual Studio when you first published the application. Figure 2 illustrates this dialog box.
     

     
  6. Click Save and Sign.

Now the published application is ready for users to launch. The downloaded application will include the Composite UI Application Block modules also.


Comments

Comments are disabled in preview mode.