ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Running windows C# program without installing NI DAQ

Hello,

I have a NI DAQ USB 6343 board, iam developing a windows C# program. Works all fine. I have a reference in my software to 

NationalInstruments.Common.dll and NationalInstruments.DAQmx.dll and they are placed into my .exe folder.

So far so good. But when i copy my project folder to another pc this all doesnt work anymore. 

The two National Instrument dlls are available but it still doesnt work. I have to install the whole NI DAQ drivers in windows

to get my app working again.

 

How can i access my NI Board without installing the complete NI DAQ software and only use the DLLs i need in may Application folder ???

0 Kudos
Message 1 of 16
(5,518 Views)

You have to install .NET 4 or/and 4.5 runtime in order to run your programm on the PC. When you install DAQmx drivers .NET checkboxes are checked and will be installed. Maybe thats the reason 🙂

 

 

0 Kudos
Message 2 of 16
(5,493 Views)

When i install the NI DAQ drivers my program runs perfectly its not a .Net problem.

My question was: how do i get it running when i dont install the NI DAQ drivers, but only

put the necessary DLL's of NI in the folder where my program is. 

So i can distribute my software without installing the complete NI DAQ drivers.

 

0 Kudos
Message 3 of 16
(5,488 Views)

This article should help you identify the right DLLs to deploy - https://www.ni.com/en-us/support/documentation/supplemental/14/ni--net-assemblies-needed-to-deploy-a...

 

You might get a better response/reach in this .NET board instead - https://forums.ni.com/t5/Measurement-Studio-for-NET/bd-p/232?profile.language=en

 

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution
0 Kudos
Message 4 of 16
(5,458 Views)

I studied the documentation. I copied the files nationalinstruments.common.dll and nationalinstruments.daqmx.dll to the folder where my app resides.

I still get the message "Could not load file or assembly ...dll or one of its dependecies". When i remove the 2 dlls from my app folder the message is different thats strange. Then the message is "Could not load file or assembly ...dll version .... culture= neutral .....or one of its dependencies".

I my visual studio project i have only references to the daqmx.dll and the common.dll, works perfect with NI drivers installed in C:\program files and C:\program files (x86)

0 Kudos
Message 5 of 16
(5,424 Views)

Hi VeH

How exactly are you installing NI DAQmx on the target machines?  To my knowledge you will need to install DAQmx driver to achieve desired result.

 

Regards) 

________

Best way to appreciate is giving Kudos/Marking as a solution

0 Kudos
Message 6 of 16
(5,182 Views)

The daqmx.dll and the common.dll are just the libraries with the user API. You need to use the full NI-DAQmx driver installer to install the .NET Runtime package as shown below.

ZYOng_0-1673529951651.png

 

-------------------------------------------------------
Applications Engineer | TME Systems
https://tmesystems.net/
-------------------------------------------------------
https://github.com/ZhiYang-Ong
0 Kudos
Message 7 of 16
(5,168 Views)

Ik will try it

0 Kudos
Message 8 of 16
(5,055 Views)

Did you ever figure this out?  I am working on running a .NET application that uses NI-DAQmx in a Docker container.  To do so, I need to create a docker image that has the correct dependencies installed.  So far, installing the NI-DAQmx driver alone doesn't work.  I am wondering if I need to install Measurement Studio in the image as well.

0 Kudos
Message 9 of 16
(4,655 Views)

Depending on what flavor of C# (I am on 8.0) you are using you can use the LibraryImport to bring in DAQmx.  Little bit of a pain to get it working cross platform, and as of now it is still requiring installation of full DAQmx  on the target. 

 

DAQmx install on linux containers is a pain. Anybody have a template they are happy with?  

0 Kudos
Message 10 of 16
(4,254 Views)