We are developing a test application using NI HW systems and the NI DAQ support components for .NET framework 4.0. We would like create an install program program for our application which does not require a separate install prodedure for the NI DAQ support dlls, but instead sets up these dlls as part of the install of our application.
Is this supported? How is it done? The method by which the NI .NET wrapper locates and loads the underlying unmanaged dlls is mysterious to me at present. In addition, I want to make sure there are no legal issues here.
- Andrew Voelkel
You can try to add these DLL's in your installer without any problems, however, this not supported by National Instruments. But, you can try to use the Application Builder from National Instruments, please refer to this link.
The link you sent isn't useful as far as I can tell because it is for Labview based apps. Ours is a .NET app which uses the NI-DAQmx support dlls.
I have traced the files loaded when I run the app using ProcMon. In addition to the dlls, the app appears to open a whole slew of .sdc files. I don't even know what these are.
It seems I'm just as far from solving this problem as I was before. Which is unfortunate, because asking all the users of our app to download a giant NI install program and then carefully select the right install options for .NET 4.0 support is quite unattractive to us.
- Andy Voelkel
If you are using Visual Studio to develop your application, you can create a install project that should grab the library files of all of the dependencies of the project you are installing, including the NIDAQ dlls, and package them with the install file. You can do a search for 'how to create an install project in visual studio' for example to get walk through tutorials. Up to and including VS 2010, VS came with an installer template. A good tutorial can be found here:
For 2012 and 2013, you have to install a thrid party template. A good tutorial for this can be found here:
Hope this helps
Reviving this old thread to kindly ask an updated link for VS2015 and VS2017 template. The provided link for 2012 and 2013 no longer exists.
Additionally, how to make sure that the deployment of the .net solution, devised on a x64 development machine, works when installed on a x86 machine, without installing the complete ~2Gb NIDAQ package?
About deploying your application developed in a 64-bit machine on a 32-bit machine, I think you can find valuable information on this Manual for Measurement Studio: http://zone.ni.com/reference/en-XX/help/375857A-01/xml/64bitsupport/
For the templates, I didn't find anything, but you should keep looking, I'm sure there's something out there, you just need the right words for the Google search
Information on that link doesn't seem very valuable.
When I devise a solution on a 64bit machine, where Nidaq installer already installed a x64 platform-specific version of the Nationalinstruments.daqmx.dll library, compiling for anyCPU only takes a 64bit version of the dll along.
On Visual Studio, you go to Project -> Properties -> Build.
You will see there that you can choose the Platform Target, select 32-bit and it will run on both 64 and 32-bit computers
Hope this works for you!