Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

WiX Installer Measurement Studio Merge Modules

Solved!
Go to solution
Is there a tutorial somewhere on how to create a WiX installer for a Measurement Studio application similar to the Knowledge Base article at http://digital.ni.com/public.nsf/allkb/ED87C183E056CAC386256DF1004E54C6? I have a Measurement Studio C# app that I am trying to create a WiX installer for and I have having troubles getting the measurement studio merge modules in it. I keep getting ICE30 errors. I am using WiX 3.0.
0 Kudos
Message 1 of 6
(6,998 Views)
Solution
Accepted by d_sdl

Hi d_sdl,

 

Our merge modules should work in WiX as I have tested this multiple times. When you say that you are getting ICE30, is this failing your build? As you probably already know, one of the nice features of WiX is that you can set a flag such that each time WiX compiles and links your source, it runs ICEs on them. This allows you to catch issues early-on in your development process. What I am guessing you are doing is setting the WiX linker to fail if ICE warnings/errors are thrown. You can configure WiX to take a variety of actions based upon what ICEs you get. What's important though is that you can turn this setting off but it depends upon how you are nvoking WiX (i.e. through NAnt, MSBuild, Votive, etc). In all cases, there are different ways of turning off this option. What I would suggest is to either turn off the option, or be specific about which ICEs to ignore. That decision would be up to the you. The key is to understand what the ICEs actually mean and determine if they are legit issues.

 

ICE30 can indicate a variety of different things but one common reason is related to SFN entries. Some of our merge modules are still generated through Visual Studio deployment projects and VS doesn't created SFNs very well. Thus you end up with duplicate SFN entries in the MSM. The long file names are different but the short filenames are the same. WiX does this correctly which is nice but unfortunately we can't convert some of those MSMs over yet because of VS restrictions and limitations we have found. It would be nice if VS created better SFNs.  

 

 

Attached is a zip file that contains a two projects which are:

  • C# project that produces the binary that the installer will install
  • WiX project that creates the MSI

 

Make sure to build the C# project first. I tested the resulting MSI and it works fine on a target system.

 

Note If you want to load up the wix project, you must have the released version of Votive on your system.

 

Best Regards, 

 

Jonathan N.
National Instruments
Message 2 of 6
(6,987 Views)

Jonathan

 

Thanks for the example project! I was able to figure my project out after looking at it. All I had to do was check the "Suppress ICE validation" checkbox and it compiled just fine.

 

Thanks again

0 Kudos
Message 3 of 6
(6,980 Views)

I have tried your example WiX project, and it is failing in two critical ways:

 

1.  Including the mkl merge module generates the following error: 

 

light.exe(0,0): error LGHT0001: Input string was not in a correct format.

 

Removing  mkl causes this error to go away.

 

2.  Among others, I receive the following critical ICE errors: 

 

light.exe(0,0): error LGHT0204: ICE03: Not a valid foreign key; Table: Directory, Column: Directory_Parent, Key(s): NIANALYSISDIR.C864C12F_832A_4CC0_A051_156244869B59

 

light.exe(0,0): error LGHT0204: ICE03: Not a valid foreign key; Table: Directory, Column: Directory_Parent, Key(s): Mesa.6FE8CEDD_964F_47A2_8F23_5A607953B235 

 

 

Suppressing ICE errors allows the .msi to build, and my application will install successfully.  However, when running, my application crashes with a DLL not found exception stating that nianalys.dll could not be found.  I believe this is related to the above ICE03 error.  I don't believe this file is being deployed with my application setup, or the registry reference to it is not being set up correctly.

 

 

0 Kudos
Message 4 of 6
(6,914 Views)

Hi gferreri,

 

1) Hmmm, that sounds like there is something wrong with that MKL merge module. Can you post that MSM and let me take a look at it since I don't get that error on my end?

 

2) Both of those ICE errors are related to the fact that NI sets some of the directory properties at runtime.  Thus Microsoft thinks these are undefined directory parent properties which they aren't. They just aren't set until runtime. 

 

You need to include the MKL merge module as that includes the underlying DLLs that is needed by the .NET analysis library. Essentially the .NET analysis library depends upon ninalys.dll which in turn depends upon those MKL DLLs.

Message Edited by Jonathan N on 11-05-2009 11:45 AM
Jonathan N.
National Instruments
0 Kudos
Message 5 of 6
(6,904 Views)

Jonathan,

 

I cannot post the mkl.msm file because it exceeds the maximum file size.  But I can tell you it is version 7.0.  I seem to have gotten around the error by editing mkl.msm using orca and modifying its summary information, which was all blank.  I think WiX was choking trying to parse a non-existant field.  I'm curious what version of mkl you are using, and why I might have a different version.

 

After solving this, I still received the nianlys.dll not found exception, until i reinstalled by running setup.exe as administrator (on a Vista machine)

 

Thanks,

Greg 

0 Kudos
Message 6 of 6
(6,891 Views)