Merge Modules
When creating software for the Windows operating system, developers commonly place code into DLLs so it can be shared among multiple applications. To distribute software to your customers, you could install the DLLs you create with a .msi setup project, but this would be a less-than-ideal way to install the code. Suppose you've built a .NET user control library that you want to sell; your customers can use this library to build their own applications. How can customers redistribute this library to their own customers? You could provide detailed instructions that explain to your users how to include the component in their own .msi setup. However, this could be problematic because if they don't install your component properly, other software that uses your component might stop functioning. Alternatively, you could create a setup project that installs and uninstalls your library, but that's not a good option because your users would have to give their customers two .msi files and make sure they were installed in the correct order.To make installing your library easy and reduce the risk of a user incorrectly installing and uninstalling a component, you can store your library in a merge module (.msm file). Merge modules are like the DLLs of a setup project. You can use a DLL to store code shared among different applications; a merge module contains installation logic shared among many .msi files. Merge module projects are similar to setup projects, except you cannot use the User Interface and Launch Conditions editors. One other difference between a setup project and a merge module project is that with a merge module project, the File System editor adds the folders Web Custom Folder and Module Retargetable Folder. If you place files in these folders, the user consuming your merge module can choose which location on disk to place the files. The user can change the installation path of the merge module contents by selecting the merge module in Solution Explorer and modifying the ModuleRetargetableFolder property in the Properties window. Consuming a merge module in a setup project is easy; you select the setup project in Solution Explorer and choose Project | Add | Merge Module.
• Table of Contents • CD-ROM Inside Microsoft® Visual Studio® .NET 2003 By
Brian Johnson, Craig Skibo Publisher : Microsoft Press Pub Date : February 12, 2003 ISBN : 0-7356-1874-7 Pages : 576
Learn how to put all the built-in power of Microsoft® Visual Studio® .NET 2003 to work with this comprehensive, in-depth programming guide. It drills down into the internal workings of Visual Studio .NET to help you get the most out of its features, editors, and project-management capabilities. You''ll see how to extend this rich, integrated development environment to maximize your productivity for any project, no matter where you are in the development cycleor which language you use. You''ll also learn how to use macros and add-ins to simplify your work. Code examples in every chapter show you exactly what to do.