Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
5 ratings:
 5 out of 5     Rate this Document

Multiple Errors When Building a Visual Studio .NET Application with Measurement Studio 7.0 Merge Modules

Primary Software: Measurement Studio>>Enterprise Edition (Full Development System)
Primary Software Version: 7.0
Primary Software Fixed Version: N/A
Secondary Software: Measurement Studio>>Professional Edition (Base Package), Measurement Studio>>Standard Edition (Starter Kit)

Problem:
I created an application in Visual Studio .NET that uses some of the Measurement Studio 7.0 .NET components (user interface controls or assemblies). I then used the Visual Studio .NET setup project to create an installer for my application and I added the necessary merge modules to the setup project. However, when I attempt to build the setup project, I receive the error message:

ERROR: Unable to import merge module [module name]

This error occurs for each merge module in the setup project. Why is this error occurring and how can I fix it?

Solution:
The issue revolves around Visual Studio .NET using the currently registered version of mergemod.dll for building MSI-based installers. It determines which version to use based on the registry information rather than the location of the .dll. Other software packages that build MSI-based installers sometimes register their own version of mergemod.dll. If there is more than one version of mergemod.dll on the machine, Visual Studio .NET (when attempting to add a merge module to a setup project) will look for the currently registered .dll, which is not necessarily the copy that was installed with Visual Studio .NET.

To fix this problem, follow these steps:
  1. Close all programs, including Visual Studio .NET.


  2. Select Start » Run.


  3. Type the following text then click OK.

    regsvr32 "C:\Program Files\Common Files\Microsoft Shared\MSI Tools\mergemod.dll"
At this point, you should be able to open your Visual Studio .NET setup project and rebuild it successfully.

Related Links:
KnowledgeBase 2HSDJOX0: Error Importing Measurement Studio 6 Merge Modules into Visual Studio .NET

Attachments:





Report Date: 05/13/2004
Last Updated: 11/14/2006
Document ID: 39CMC50U

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit