Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

How to create a setup and deployment package that properly deploys NI DLLs - XP

I am using VisualStudio 2012 and Measurement Studio 2013 and am having problems deploying applications via InstallShield provided as part of VisualStudio 2012.  My target machine is running Windows XP, so I will be using the 4.0 .NET Framework.  I was able to successfully register NI DLLs using the previously provided Setup and Deployment Wizard from Microsoft, but am having problems with InstallShield 2012 Spring Limited Edition.   The attachment shows one of the problems I have when my application starts to run on the target machine, apparently due to a DLL not being registered.

 

I prefer using Microsoft tools, and not having to resort to third party tools as case in point I have seen another posting "Re: MeasurementStudio 2013 using VS2012 DAQmx Dependency Problem After Upgrading" which states:

 

A Corrective Action Request (382945) has been filed on this behavior and R&D is currently looking into a workaround. If possible, I would recommend using WiX. This is not a guranteed fix, but this has been used to successfully deploy Measurement Studio applications without the error you are receiving.

 

What is the timeline for this fix?  Also, more importantly, since I don't need Windows 7 support (deploying to XP machines), I don't need Measurement Studio 2013, I could use 2012.  I am trying to do this in InstallShield, pointing to the 2012 versions of Measurement Studio since they support Windows XP, as they also apparently get installed when you install MeasurementStudio 2013.  Is there a short term solution for me since I don't need Windows 7/8 support?

0 Kudos
Message 1 of 18
(8,237 Views)

HI John_K,

 

I am currently getting in contact with R&D to figure out the status of the Corrective Action Request that you mentioned. One of the things that I can add while I await that response is that WiX, as you noticed, is our recommended solution. It is actually a Microsoft developed tool released on an open source license so that may ease your concerns about sticking with Microsoft Tools as it is actually a Microsoft tool.

 

Once I get a good response from R&D I will get back with more information to help move things along for you

 

Regards,

 

 

James W.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 18
(8,206 Views)

Based on your response, I plan on using WiX.  Is there any clear documenation on how to deploy the NI DLLs?  I am specifically using the NI-DAQmx, UI, UI.WindowsForms and Common DLL files.

 

Thanks,

0 Kudos
Message 3 of 18
(8,203 Views)

NI recommends that .NET users use WiX for their VS2012 deployments and Visual Studio setup projects for VS 2010 and earlier deployments.

Measurement Studio merge modules were originally designed for use with the Visual Studio setup projects that were available for Visual Studio 2010 and earlier; Microsoft no longer supports setup projects in Visual Studio 2012. During our VS2012 deployment testing, we found many compatibility issues with using the Measurement Studio merge modules with InstallShield. However, these merge modules worked fine in VS2012 WiX deployment projects and VS2010 or earlier setup project deployment.

For example, the particular issue you are running into is that InstallShield is including the wrong version of the DAQmx assemblies in the installer (it is including the .NET 2.0 instead of .NET 4.0 versions on my test system). This is despite the fact that the merge modules specifically instruct the installer to include the .NET 4.0 version. That is what bug ID 382945 is intended to investigate. We have not determined if the bug exists in the MStudio merge module or InstallShield.

The Measurement Studio team has decided not to provide support for InstallShield at this point because of issues like these that we have been unable to resolve.

On the other hand, WiX works very well with Measurement Studio merge modules. We have found that WiX is extremely robust, well documented, free, and easy to maintain. The primary disadvantage to WiX is the learning curve required to begin using it. In order to address this, we have provided a fully functional example for WiX deployment project that requires little modification to create a distribution for any MStudio application (C:\Users\Public\Documents\National Instruments\MStudioVS2012\DotNET\Examples\Application\Deployment\WiX). Refer to the installed Measurement Studio 2013 Help for more information. And download wix from wixtoolset.org.

I also understand your concern about using a third-party tool because it introduces another vendor in addition to Microsoft and National Instruments that you have to worry about support for. This was the primary appeal to the Visual Studio setup projects that MStudio supported in Visual Studio 2010 and earlier and we are sad to see it retired. But I do feel like I must point out that InstallShield, while it is packaged with Visual Studio, is not actually a Microsoft product. InstallShield is produced by Flexera Software and the included version is only the LE edition. However, WiX was originally developed by Microsoft but was released under Common Public License.

National Instruments
0 Kudos
Message 4 of 18
(8,194 Views)

The example provided by NI )(C:\Users\Public\Documents\National Instruments\MStudioVS2012\DotNET\Examples\Application\Deployment\WiX) does now show how to deploy the DAQmx files in WiX.  Can you please provide an example or even better, provide speicfics on how to deploy DAQmx in a .NET application via WiX?

0 Kudos
Message 5 of 18
(8,186 Views)

Hi John_K,

 

Have you had opportunity to attempt building with the DAQmx files? The process should be the same as the other merge modules, as they are all built by the same team. The help documentation for Measurement Studio 2013 also does provide some more direction if you take a look at Walkthrough: Deploying a VSPackage-> and the category of Deployment By Using the Windows Installer XML Toolset. The difference is making sure to add the DAQmx merge module information to the WiX project. If you are encountering issues with that, let us know so we can look further into what could be going wrong.

 

Regards,

James W.
Applications Engineer
National Instruments
0 Kudos
Message 6 of 18
(8,170 Views)

Yes, I am having a problems as it is not intuitive (manually creating XML files).   I have attached a WXS where I tried to take a stab at including DAQmx files, but I can't find clear documenation on what files to include depending upon the DAQmx I wish to deploy (.NET 4.0 compatible).  I guess I was just spoiled by the old packing and deployment wizard previously included in VSTudio 2010 and the use of WiX is much more complicated and error prone.

 

I was hoping NI had a working sample, that shows how to include DAQmx components and not just UI components in MeasurementStudio.

 

Can you provide a wxs file for use with DAQmx (i.e. a working example)?  If not, when will the bug be fixed where you can't deploy with InstallShield?

 

In other words, I cannot find clear documentation on how to build a Wix file to include the required info. for DAQmx files - particularly since it varies by version and I want to deploy the 2010 version since I am using the .NET 4.0 framework.


Thanks,

0 Kudos
Message 7 of 18
(8,166 Views)

Hi John_K

 

I am working on getting materials together for you to refernece and see if I can either get an example or pointers on what is needed to get the WiX deployment set up. I will post an update once I have that information for you.

 

Regards,

 

James W.
Applications Engineer
National Instruments
0 Kudos
Message 8 of 18
(8,137 Views)

Thanks.  I am hoping a complete working example can be provided.

 

However, if that is not possible, I would need to know how to get the information required to describe the MSM and other files as illustrated in bold below.  I am not sure how to find that information.  Again, even though I am using Measurement Studio 2013, I am still targeting the .NET 4.0 Framework, so I would need to use the 4.0 compatible NI DLLs which are I think? are the 2010 versions.  Please confirm. 

 

      <!-- DataSocket x86 -->
      <Merge Id="MStudioNet" Language="0" SourceFile="$(var.MergeModulesDir)\MStudioNet.2012.msm">
        <ConfigurationData Name="ReconfiguredDir.9E7770D8_2B24_4177_A474_8070436F49A3" Value="$(var.RetargetableDir)"/>
        <ConfigurationData Name="Config_MStudioNet.9E7770D8_2B24_4177_A474_8070436F49A3" Value="NI.Net.dll.9E7770D8_2B24_4177_A474_8070436F49A3"/>
      </Merge>

 

Thanks,

 

John K

0 Kudos
Message 9 of 18
(8,128 Views)

Hi John_K,

 

Again, thanks for your feedback and input on this. I will actually be filing a Corrective Action Request to update the WiX deployment example because it currently should have hardware merge modules as part of the example. I have not had time to generate a working DAQmx example for you due to my current project load but I wanted to at least give you the tools needed to not keep you waiting on my development.

 

1. Take the TDMS.wxs file and created a copy called DAQmx.wxs.

 

2. Fix the dependencies of the merge module in the section called FeatureGroup towards the bottom of the file. You can find a list of the dependency merge modules in the help topic Measurement Studio Merge Modules. DAQmx only requires Microsoft_VC100_CRT_x86.msm and Microsoft_VC100_CRT_x64.msm. You do not need to include MStudioDAQmx.2010.msm because that is itself, and MStudioCommon.2010.msm is always already included in the example. Remove all of the MergeRef elements except for "Microsoft_VC100_CRT_x86" and "Microsoft_VC100_CRT_x64".

 

3. Fix the DAQmx merge module information. You can do a find and replace of TDMS with DAQmx everywhere inside the DirectoryRef element. So that "MStudioTdms" becomes "MStudioDAQmx" and "Config_Tdms" becomes "Config_DAQmx" and etc.

 

4. You will need to figure out the module signature GUID from the merge module. You can do this with installer developer tools such as Orca or InstedIt which are both freely available online (Orca may be installed with Visual Studio). If you open MStudioDAQmx.2010.msm in one of these tools and look at the ModuleSignature table, you will find a ModuleID such as "MStudioDAQmx.2010.58D97DB1_77E6_476E_9B14_C9529BFA6F94". The GUID on the end of this is the GUID you will need to replace into the wxs file. For example, "Config_DAQmx.58D97DB1_77E6_476E_9B14_C9529BFA6F94". Note that there are separate merge modules for 32-bit and 64-bit and they have different GUIDs. Each GUID is stored in 3 locations in the file. DAQmx 32-bit uses 58D97DB1_77E6_476E_9B14_C9529BFA6F94 and DAQmx 64-bit uses 39EA4820_BBEB_48AD_B8AA_89A933155601.

 

Let me know if there are issues with those steps. Again, thank you for your patience and feedback as it now can help us get better materials available for Measurement Studio 2013.


Regards,

James W.
Applications Engineer
National Instruments
0 Kudos
Message 10 of 18
(8,116 Views)