Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Having issues with NI.Common not showing up on deployment machine

Solved!
Go to solution
I'm currently working on a long running project that uses a few NI graph controls and the DAQmx libraries to obtain data from a USB DAQ and graph that data. I have a development environment that runs VS2010 using C# 4.0 and version 9.3 of the DAQmx drivers. I have measurement studio 2010 SP1 version 9.1.0.204 installed as well. The highest version of NationalInstruments.Common file on my development machine is 9.1.40.159. My problem is thus: I recently installed an updated version of this software onto a customer's machine. Upon starting up the software to test it, the .NET run-time threw an exception, stating that it couldn't find NationalInstruments.Common version 9.1.40.159. After inspecting the dlls installed in C:/Program Files/National Instruments/ I was surprised to find that there was no folder for the VS2010 assemblies. I manually installed the 9.3 DAQmx drivers (file name NIDAQ930f2 obtained from NI's support website) but the 9.1.40.159 common dll was still missing. I attempted to install the 9.1 drivers as well, but the 9.1 DAQmx driver package complained that a later version was already installed and it refused to install anything. Furthermore, because the customer's machine doesn't have VS2010 installed, the 9.3 drivers refuse to install any of the supporting VS2010 dlls. This is major problem because we can't install visual studio on every one of our customers' machines just to get the NI software to work. What driver package contains version 9.1.40.159 of NationalInstruments.Common? While deploying this software, in addition to DAQmx drivers (installed separately from the main .msi installer), will I need to install a version of measurement studio as well? Thank you for your time, Andrew
0 Kudos
Message 1 of 7
(4,838 Views)

Hello Andrew,

     Measurement Studio is an additional toolset for Visual Studio.  Measurement Studio will require a working copy of Visual Studio to run.  Once you have a running version of your software on the developer’s station using the ability of Visual Studio to create an executable you should be able to create an executable that includes the necessary DLLs and libraries for your application to run.

     If you are trying to develop on these additional computers you will need a copy of Visual Studio. When trying to run an executable it should work, if not copy the DLL’s with the file.

Daniel

0 Kudos
Message 2 of 7
(4,834 Views)

Hi Andrew,

 

You don't have to install Visual Studio on your target systems to get your DAQmx application to work properly. Once you have built your DAQmx application on your development computer you have two options for deploying which are:

  • Merge Module deployment - You will build a setup application in Visual Studio which will include your exe along with the required NI assemblies (e.g., DAQmx, Common, etc).
  • XCOPY deployment - Manually copying over the assemblies you need onto the target system.

In addition to one of the above options, you must also install the DAQmx driver to get the underlying depenendies on those targets systems. We have topics in our help called "Measurement Studio .NET Merge Modules" and "Measurement Studio .NET XCOPY Deployment Files" that list out all the files you need to deploy.

 

Measurement Studio Common versioning and deployment is slightly different in that Common uses policy files to redirect applications to the latest Common on the system. This is discussed in the "Measurement Studio .NET Class Library Versioning for Development and Deployment" help topic. I would highly recommend you read that.

 

In the end, if you are building against 9.1.40.159 of Common, you need to make sure you target systems have at minimum, that version. They can have higher versions as the policy files will take care of that.

 

Hope this helps.

Jonathan N.
National Instruments
0 Kudos
Message 3 of 7
(4,806 Views)
I have measurement studio installed on the DEVELOPMENT machine (my laptop), but not the DEPLOYMENT machine (the customer's desktop). Do I need to have measurement studio installed on the DEPLOYMENT machine in order to have the necessary dlls in place? In the past, copying NationalInstruments.Common has resulted in licensing errors and the dll won't load because of license files being missing. Is there a driver package somewhere that contains NationalInstruments.Common version 9.1.40.159 that can be installed WITHOUT having the corresponding version of visual studio installed? Andrew
0 Kudos
Message 4 of 7
(4,805 Views)
Solution
Accepted by topic author AndrewStone

Hi Andrew,

 

You don't have to have Measurement Studio installed on the deployment systems to get your application to work. All required dependencies should be available via merge modules or as standalone files via XCOPY (e.g., unless its specifically called out in the help that the library doesn't support XCOPY deployment). 

 

There isn't a standalone installer for Common that we have available. The suggested approach is that you build a setup project in Visual Studio which will include all required dependencies, include Common. When you run this setup project on your target system it will install your application along with the required dependencies (e.g., DAQmx.dll, Common assemblies, VC runtime dependencies, etc).

Jonathan N.
National Instruments
0 Kudos
Message 5 of 7
(4,803 Views)

Thanks for the reply Jonathan.  I've tried building an installer package with the required merge modules, but for some reason the common dlls don't end up on the target system, and thus throw exceptions when the runtime tries to load them.  I'll try rebuilding the installer and see if that works, thanks for your help.  I'll let you know how that goes.

 

Andrew

0 Kudos
Message 6 of 7
(4,801 Views)

Your suggestion of rebuilding the installer worked just fine.  With the correct merge modules and dependencies detected, the application worked the first time after it was installed.

0 Kudos
Message 7 of 7
(4,788 Views)