03-31-2022 03:28 AM
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 ???
04-01-2022 03:31 AM
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 🙂
04-01-2022 03:38 AM
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.
04-09-2022 09:25 PM - edited 04-09-2022 09:27 PM
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
04-26-2022 05:50 AM
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)
01-12-2023 02:11 AM
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
01-12-2023 07:26 AM
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.
02-03-2023 08:22 AM
Ik will try it
07-12-2023 08:23 AM
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.
12-01-2023 12:08 PM - edited 12-01-2023 12:09 PM
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?