07-16-2013 08:37 PM
Hi
I am trying to create an MSI using WiX for a project using the VISA mergw modules that come with VISA 5.3, which I installed as part of the IEEE 488.2 package. mstudiovisa.2010.msm requires mstudiocommon.2010.msm. When I include the latter in the project file (.wxs). the compiler produces errors such as listed below (partial list)..
I am not getting errors when using the MSM in a Visual Studio installed project.
Any suggestions for a fix would be greatly appreciated.
Thanks
David
light.exe(0,0): error LGHT0204: ICE30: The target file 'NATION~1.CON|NationalInstruments.NiLmClientDLL.config' is installed in '[TARGETDIR]\Visa Tester\' by two different components on an LFN system: 'C__016BDF7D90874798B4BE0BDA0C05A49A.039160C5A7A24C49AD122694436A47BB' and 'C__2E0318AAB2BF4B7189A8CF21FD7185BC.039160C5A7A24C49AD122694436A47BB'. This breaks component reference counting.
light.exe(0,0): error LGHT0204: ICE30: The target file 'NATION~1.CON|NationalInstruments.NiLmClientDLL.config' is installed in '[TARGETDIR]\Visa Tester\' by two different components on an LFN system: 'C__016BDF7D90874798B4BE0BDA0C05A49A.039160C5A7A24C49AD122694436A47BB' and 'C__2E0318AAB2BF4B7189A8CF21FD7185BC.039160C5A7A24C49AD122694436A47BB'. This breaks component reference counting.
light.exe(0,0): error LGHT0204: ICE30: The target file 'NATION~1.CON|NationalInstruments.NiLmClientDLL.config' is installed in '[TARGETDIR]\Visa Tester\' by two different components on an LFN system: 'C__016BDF7D90874798B4BE0BDA0C05A49A.039160C5A7A24C49AD122694436A47BB' and 'C__46B6CB4FBD354C73B7A67EE8D9DA4361.039160C5A7A24C49AD122694436A47BB'. This breaks component reference counting.
light.exe(0,0): error LGHT0204: ICE30: The target file 'NATION~1.CON|NationalInstruments.NiLmClientDLL.config' is installed in '[TARGETDIR]\Visa Tester\' by two different components on an LFN system: 'C__016BDF7D90874798B4BE0BDA0C05A49A.039160C5A7A24C49AD122694436A47BB' and 'C__46B6CB4FBD354C73B7A67EE8D9DA4361.039160C5A7A24C49AD122694436A47BB'. This breaks component reference counting.
light.exe(0,0): error LGHT0204: ICE30: The target file 'NATION~2.CON|NationalInstruments.NiLmClientDLL.config' is installed in '[TARGETDIR]\Visa Tester\' by two different components on an LFN system: 'C__2E0318AAB2BF4B7189A8CF21FD7185BC.039160C5A7A24C49AD122694436A47BB' and 'C__46B6CB4FBD354C73B7A67EE8D9DA4361.039160C5A7A24C49AD122694436A47BB'. This breaks component reference counting.
light.exe(0,0): error LGHT0204: ICE30: The target file 'NATION~2.CON|NationalInstruments.NiLmClientDLL.config' is installed in '[TARGETDIR]\Visa Tester\' by two different components on an LFN system: 'C__2E0318AAB2BF4B7189A8CF21FD7185BC.039160C5A7A24C49AD122694436A47BB' and 'C__46B6CB4FBD354C73B7A67EE8D9DA4361.039160C5A7A24C49AD122694436A47BB'. This breaks component reference counting.
light.exe(0,0): error LGHT0204: ICE30: The target file 'NATION~1.CON|NationalInstruments.NiLmClientDLL.config' is installed in '[TARGETDIR]\Visa Tester\' by two different components on an LFN system: 'C__016BDF7D90874798B4BE0BDA0C05A49A.039160C5A7A24C49AD122694436A47BB' and 'C__63DA4DFA08B847EBBE9EA67DDFA881CD.039160C5A7A24C49AD122694436A47BB'. This breaks component reference counting.
light.exe(0,0): error LGHT0204: ICE30: The target file 'NATION~1.CON|NationalInstruments.NiLmClientDLL.config' is installed in '[TARGETDIR]\Visa Tester\' by two different components on an LFN system: 'C__016BDF7D90874798B4BE0BDA0C05A49A.039160C5A7A24C49AD122694436A47BB' and 'C__63DA4DFA08B847EBBE9EA67DDFA881CD.039160C5A7A24C49AD122694436A47BB'. This breaks component reference counting.
light.exe(0,0): error LGHT0204: ICE30: The target file 'NATION~2.CON|NationalInstruments.NiLmClientDLL.config' is installed in '[TARGETDIR]\Visa Tester\' by two different components on an LFN system: 'C__2E0318AAB2BF4B7189A8CF21FD7185BC.039160C5A7A24C49AD122694436A47BB' and 'C__63DA4DFA08B847EBBE9EA67DDFA881CD.039160C5A7A24C49AD122694436A47BB'. This breaks component reference counting.
light.exe(0,0): error LGHT0204: ICE30: The target file 'NATION~2.CON|NationalInstruments.NiLmClientDLL.config' is installed in '[TARGETDIR]\Visa Tester\' by two different components on an LFN system: 'C__2E0318AAB2BF4B7189A8CF21FD7185BC.039160C5A7A24C49AD122694436A47BB' and 'C__63DA4DFA08B847EBBE9EA67DDFA881CD.039160C5A7A24C49AD122694436A47BB'. This breaks component reference counting.
light.exe(0,0): error LGHT0204: ICE30: The target file 'NATION~5.CON|NationalInstruments.NiLmClientDLL.config' is installed in '[TARGETDIR]\Visa Tester\' by two different components on an LFN system: 'C__46B6CB4FBD354C73B7A67EE8D9DA4361.039160C5A7A24C49AD122694436A47BB' and 'C__63DA4DFA08B847EBBE9EA67DDFA881CD.039160C5A7A24C49AD122694436A47BB'. This breaks component reference counting.
light.exe(0,0): error LGHT0204: ICE30: The target file 'NATION~5.CON|NationalInstruments.NiLmClientDLL.config' is installed in '[TARGETDIR]\Visa Tester\' by two different components on an LFN system: 'C__46B6CB4FBD354C73B7A67EE8D9DA4361.039160C5A7A24C49AD122694436A47BB' and 'C__63DA4DFA08B847EBBE9EA67DDFA881CD.039160C5A7A24C49AD122694436A47BB'. This breaks component reference counting.
light.exe(0,0): error LGHT0204: ICE30: The target file 'NATION~6.CON|NationalInstruments.Common.config' is installed in '[TARGETDIR]\Visa Tester\' by two different components on an LFN system: 'C__4DCFB2C5FC44400BA4B4CA245390C113.039160C5A7A24C49AD122694436A47BB' and 'C__78B0A59F2E584CB48B2993A61B055DC3.039160C5A7A24C49AD122694436A47BB'. This breaks component reference counting.
light.exe(0,0): error LGHT0204: ICE30: The target file 'NATION~6.CON|NationalInstruments.Common.config' is installed in '[TARGETDIR]\Visa Tester\' by two different components on an LFN system: 'C__4DCFB2C5FC44400BA4B4CA245390C113.039160C5A7A24C49AD122694436A47BB' and 'C__78B0A59F2E584CB48B2993A61B055DC3.039160C5A7A24C49AD122694436A47BB'. This breaks component reference counting.
light.exe(0,0): error LGHT0204: ICE30: The target file 'NATION~6.CON|NationalInstruments.Common.config' is installed in '[TARGETDIR]\Visa Tester\' by two different components on an LFN system: 'C__4DCFB2C5FC44400BA4B4CA245390C113.039160C5A7A24C49AD122694436A47BB' and 'C__84BBDA9D53784C71992935FBA4FA4021.039160C5A7A24C49AD122694436A47BB'. This breaks component reference counting.
Solved! Go to Solution.
07-18-2013 12:21 PM
Hi David,
Unfortunately, it is expected behavior that you will receive ICE errors when using some of the NI merge modules. These errors are actually in the NI merge modules and not a result of your deployment configuration. You will notice in our example WiX distribution, we enable the option to Suppress ICE validation so that the user does not receive these errors.
The specific ICE30 error you are receiving is warning you that the reference counting may be broken in some scenarios. This is true for the merge module, but since the NI assemblies are intentionally leaked when uninstalled, there is no ill effect of the incorrect reference counting. You can safely ignore this error.
The setting to ignore ICE errors is found in the Project Properties under the Tool Settings tab.
07-18-2013 03:26 PM
Hi D_B,
Thank you for the detailed and reasoned explanation -- this makes sense.
I did set the project to ignore ICE30 errors and it compiled ok. It seems like we are moving to better pastures with WiX as VS deployment project issues very few warnings.
Could you also address the following as well:
(1) Where could I find the "example WiX distribution"? It does not seem to be part of VISA 5.3?
(2) Now that the Visual Studio Deployment project is going away, what would you do to identify dependencies of the project DLLs?
Thanks
David
Thanks
David
07-19-2013 11:34 AM
Hi David,
The example WiX project I am referring to is installed by Measurement Studio at "C:\Users\Public\Documents\National Instruments\MStudioVS2012\DotNET\Examples\Application\Deployment\WiX\All Libraries". However, this example only supports the Measurement Studio libraries. We are in the process of finalizing some examples that support the hardware libraries VISA, 488.2, and DAQmx. I will post a link to those here when they are published. But in the meantime, I have attached the current version of the examples which are near final.
For a list of dependencies required in a distribution, you can refer to the Measurement Studio Help topic Measurement Studio Merge Modules and Deployment Files.
07-19-2013 03:04 PM
Hi D_B
Excellent example!
I am using WiX 4.0 so I will implement and test the modified code and upload with comments as necessary.
Also, could you remind the gals responsible for the Visa packaging to include said examples in the next release. They have excellent code examples, So adding the installer s examples will be a cream on the pie.
Also, off-the-bat note that the merge modules are in %commonprogramfiles(x86)%. Also, it seems that the Example build defaulted to x64 on my system, in which case it cannot be installed under x86 and the program files folder is [ProgramFiles] and not [ProgramFiles64]. Lots of t's to cross and i's to dot.
Thanks a lot.
David
PS. Where did your kudos go?
07-20-2013 06:50 PM
Hi D_Biel,
I got the code to work under WiX 4.0 after making the following minor changes:
While the installation works, the sample program will not run because the Visa dll is installed in a child folder of the program folder 'Module Retargetable Folder'. Also, when uninstalling the program, the files installed by the Common merge module are not removed.
I attached the install log where you can see that while the new retargetable property of the Common merge module is set correctly, the same property of the visa merge module appends the 'Module Retargetable Folder' name.
Property(S): NEWRETARGETABLEPROPERTY1.E14BEBE084684B559960689A3B7B30AD = C:\Program Files\Example Company Name\Example Application\Module Retargetable Folder\
Property(S): NEWRETARGETABLEPROPERTY1.561DF055CF93485F8DD042F9DE0BEEA2 = C:\Program Files\Example Company Name\Example Application\
I checked with Orca and the property as defined in the VISA40.msm is correct.
I tried making changes in the code -- nothing worked. I hope you can help me make sense of this.
Thanks
David
07-22-2013 10:10 PM
Hi B_Diel
I tested the attached code works with WiX 4.0 -- it looks like it is working ok.
I tagged my changes with the 'DH: ' prefix.
Essentially no custom actions are called for.
I would assume the code will also work under earlier versions of Wix upon reversing some of the changes I noted in the previous post.
David
07-23-2013 02:29 PM
Thank you very much for all the great feedback!
We are not claiming support for WiX 4.0 yet, so we have not done any testing with that version. However, I believe many of the changes you made should have been handled by the upgrade wizard. Since 4.0 is still in beta, maybe that feature is not currently available.
We are aware of a few issues with the 2010 merge modules and are creating a batch script that should help with updating those.
It is interesting that you were able to do this without custom actions. We were not thrilled about having to use the custom actions, so we will review your modifications to see how that might improve the example. However, there are a few requirements we must maintain in order to make the example work in very general use cases. It may be that your requirements are not as broad as ours. However, this is the benefit of WiX that you are able to modify the example to meet your specific needs.
Also, we intentionally let the NationalInstruments.Common.dll assemblies leak in the GAC on uninstall because they are used by many NI applications and removing them on uninstall may have adverse affects. If your end users are likely to only have your single product installed, then removing them is probably preferred.
Again, thank you for the feedback and posting your comments on the web for others.
07-23-2013 04:53 PM
Hi D_Biel,
I am glad I could contribute back to the community. The code is open on www.Bitbucket.org\davidhary, where I am hosting my projects..
I jumped into using WiX 4.0 because Rob Mensching suggested 4.0 will be 'simpler' -- so far 4.0 has been rock solid. I wonder if 3.6 or 3.7 (the current formal release) would allow the install to set the properties without the need for custom actions. That might shed light on what Rob Mensching meant by simpler.
Got it on the common MSM -- it does make sense to send it to the GAC.
Finally, have you looked into figuring out what version of visa32/64.dll is required for the NI VISA dll? On my x64 install of rev 5.3 I found the VISA 32 and 64 DLLs under system 32 with version 3.2.0 whereas in SYSWOW64 visa32.dll is rev 5.3.0.
Thanks for your kind words -- your posting a good example made this conversation possible in the first place....
David
07-24-2013 03:47 PM
David,
We looked at your recommendation for removing the custom action in a bit more detail and determined that the custom actions are needed in the general case. They are necessary if you plan on retargeting the assemblies to be installed to a location other than the application directory. These wouldn't normally be necessary (and are not necessary in our VS 2012 example), but our VS 2010 merge modules exhibit a bug in merge modules produced through Visual Studio instead of WiX. So the custom actions implement a workaround that allows them to be retargeted to any location. In your case, it is fine to remove the custom actions because you are not retargeting the merge modules.
Additionally, I would like to point out something else in the early version of the example that I sent you. All of the GUIDs at the top of the Product.wxs file need to be replaced with your own GUIDs. In this version, they were hardcoded for testing purposes, and will be replaced with TODOs in the release version.
As for the different versions of VISA dlls. The visa32.dll in SysWOW64 is the NI-VISA library where all the functionality exists. It should be version 5.3 as you found. The visa32/64.dll libraries in System32 are actually the IVI foundation versions of these libraries and just redirect to the visa32.dll in SysWOW64. These version of these correspond to the version of IVI you have on your system. The NI-VISA installer actually installs IVI, so they will be installed on your system in addition to the library in SysWOW64.