Novick Software
SQL Server Consulting • Design • Programming • Tuning

  andy novick is a sql server mvp

 

 

Tips and Tricks for:  .Net, C#, VB.Net, Infragistics Net Advantage WinForms Suite

 

The Problem:   When deploying the Infragistics Controls for WinForms there's no Merge Module Supplied

The Infragistics Net Advantage WinForms (INW) Suite contains a few dozen controls spread across about 10 DLLs.  I've found that they can really add functionality to a project, which is why I use them in the first place.  The can also add in another way: bloated distributions.  When you use most of the controls for your project you end up with about 10 megabytes of files.  Fair enough, there's a lot in the package.  When it comes time to distribute your WinForms application you face additional issues. 

In their news group postings the Infragistics tech support staff suggests that you change CopyLocal to true on all the INW libraries while building your release version so that the INW controls are copied into the \BIN directory and they can be XCOPY deployed.  You better remember to turn COPYLOCAL to false on all your projects before trying to run in the DEBUG configuration because if you don't you'll run into a cascade of errors due to a Visual Studio 2003 limitation on having a local copy and one in the global-assembly-cache (GAC) at the same time.

Distributing all the INW DLLs with each application isn't a very good solution either, particularly if you have several applications.  The INW DLLs will go into each application's deployment directory.  The good news is that side-by-side deployment of the controls works and you can deploy this way.  The bad news is that each application has 10 megabytes of INW DLLs. 

The real problem arises when you start having an application update strategy based on the Updater Application Block (UAB) (see the MSDN Patterns and Practices site).  UAB doesn't do anything about getting rid of old versions of the program so if you have 10 updates to your application you end up with 10 directories with the code in it.  And if you use INW and include their DLLs in the application directory you end up with 10 times 10 megabytes of INW DLLs.  So let's say that you have 10 applications and you can see how fast you could chew up every user's disk space.


Solution: Create a Merge Module project to produce an MSM for the Infragistics controls.

The solution that I've arrived at is to create a merge module project for the INW WinForms controls and to include it in my Setup Project (MSI).  That way there's only one copy of the controls on the machine for each version of INW.   Of course, this approach forces you to have a Setup project (WMI a.k.a Windows Installer) but I find that I often need this anyway for installing COM components or other merge modules (MSM) such as Crystal Reports, MSDE, or the .Net Framework itself.  Each version of the Infragistics WinForms controls will require a new MSM.  More good news is that the multiple versions can live beside each other in the GAC.

The attached project builds a merge module for all the WinForms controls in the Infragistics Net Advantage Suite 2004 volume 1 also numbered Version 3.1.  You might reduce it's size by removing some of the controls if you're sure that you'll never need them.


RSS as HTML

Personal Blog

 
New Tips:

Use dsinit to set the SQL Server instance for Windows Azure dev storage

Upcoming
Presentations:

SQL PASS
Nov 7, '12
Biggest
Loser: DB
Edition


Full Schedule