Adding Merge Modules to Your Setup
Merge modules are another method of packaging a component for redistribution. The beauty of merge modules is that they're independent installation components that contain all the necessary logic to successfully install, but they can't be installed on their own. They must be part of an MSI package. Like the setup project you created earlier, you can create a merge module project with resources, dependencies, launch conditions, and custom actions. Merge modules are very useful for pre-packaging components that must be shared across multiple resources on a computer, or just as a mechanism of breaking apart a large installation.There's a Merge Module project template that you can use to create your own merge modules, or you can add a merge module to your setup project if it already exists.To find out how to add a merge module, return to the InstallerTestSetup project and get to the File System Editor by right-clicking on the project name and selecting View, File System Editor from the contextual menu.Next, select Add, Merge Module from the Project main menu. You're now prompted with the Add Module dialog that Figure 4.27 displays.
Figure 4.27. The Add Modules dialog box.

In the C:\Program Files\Common Files\Merge Modules folder there are predefined merge modules for several components. Select the msmask32_X86_ENU.msm as shown in Figure 4.27. Notice that merge modules have an .msm extension. After the file is selected, it can be seen in your Solution Explorer.When you build the application, the MSMakedEdit control's merge module will be included with the MSI package, and it will install as part of your package.If the installation of the merge module fails, the complete installation fails because the merge module is part of the package. From your point of view, it's just another component to include in your deployment package.
• Table of Contents
• Index
Sams Teach Yourself Visual Studio® .NET 2003 in 21 Days
By
Jason Beres
Publisher
: Sams Publishing
Pub Date
: January 14, 2003
ISBN
: 0-672-32421-0
Pages
: 696
Sams Teach Yourself Visual Studio .NET in 21 Days will help developers that are new to application development and experienced developers understand how to use the .NET Framework and Visual Studio .NET to rapidly develop any type of computer application. The Visual Studio .NET development environment is the most comprehensive developer tool ever created, putting that together with the .NET Frameworks' Class Libraries, the developer has everything he or she needs to get up-to-speed on Microsoft's latest revolution in application development. This book will guide the developer through using the VS .NET IDE, the Visual Basic .NET and C# language, and the supporting tools available from Microsoft to create Windows and Web-based applications. The market is full of books that pretty much say the same thing, which is already available in the help files, the author of this book has written and deployed over a dozen successful applications using Visual Studio .NET and the .NET Framework. All of his expertise and experience is used to give you the most comprehensive title on using Visual Studio .NET.