07-07-2026 03:01 PM
I have a .NET application that used to work with versions 17, 24.3, and 25.8 of DAQmx.
I had to uninstall NI software and drivers completely a week ago due to some issues (fully cleaned, removed directories, registry entries, etc.)
I then installed DAQmx v24.3 and I get an exception saying that NationalInstruments.DAQmx.dll or one of its dependencies could not be loaded.
System.IO.FileNotFoundException
HResult=0x8007007E
Message=Could not load file or assembly 'NationalInstruments.DAQmx.dll' or one of its dependencies. The specified module could not be found.
Source=mscorlib
StackTrace:
at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.Assembly.Load(AssemblyName assemblyRef)
...
Relevant code snippet:
private const string TargetAssemblyName_NIDAQ = "NationalInstruments.DAQmx";
private const string TargetPublicKeyToken_NIDAQ = "dc6ad606294fc298";
private const string TargetCulture = "neutral";
...
var name = new AssemblyName
{
Name = TargetAssemblyName_NIDAQ,
CultureInfo = TargetCulture == "neutral" ? null : new System.Globalization.CultureInfo(TargetCulture),
};
name.SetPublicKeyToken(HexToBytes(TargetPublicKeyToken_NIDAQ));
var asm = Assembly.LoadFrom(daqPath);
return asm.GetName().Version;
Note: This is just the part that checks the DAQmx version. The application loads DAQmx for use later (this also fails with the same exception).
The DAQmx device shows up in NI MAX.
I used ProcessMonitor to check which dependency it was and got a NAME NOT FOUND (with no subsequent SUCCESS result) for the following 2 DLLs:
C:\Windows\Microsoft.NET\assembly\GAC_64\NationalInstruments.DAQmx\v4.0_24.3.40.49472__dc6ad606294fc298\libexpat-1-ni.dll
C:\Windows\Microsoft.NET\assembly\GAC_64\NationalInstruments.DAQmx\v4.0_24.3.40.49472__dc6ad606294fc298\libcrypto-3-ni.dll
Any ideas here?
Debugging this has eaten up several days.
07-09-2026 08:06 PM - edited 07-09-2026 08:07 PM
I found the issue and I'm sharing my resolution here in case anyone else runs into this issue.
The original problem popped up after I updated NI VISA to the latest version (2026 Q2).
For some reason, this was not working with some other instruments I had, so I uninstalled it and installed an older version.
I was still having issues so I decided to follow this to completely remove all NI software and drivers:
https://knowledge.ni.com/KnowledgeArticleDetails?id=kA0VU000000DhqL0AS&l=en-US
This is what I think happened:
It looks like NI Package Manager uninstall process does not touch the NI shared library DLLs that were installed in System32.
The newer version of the shared library uses the NI OpenSSL 3 components, specifically "libcrypto-3-ni.dll".
The older version of NI DAQmx I installed uses the NI OpenSSL 1 components.
The OpenSSL components are uninstalled during the uninstall process.
So when I installed DAQmx, it installed OpenSSL 1 components.
But, the untouched shared libraries are still the new version that use OpenSSL 3 components.
So old version of DAQmx tries to load the shared library, shared library tries to load "libcrypto-3-ni.dll" which doesn't exist, fail.
There's another NI shared library dependency DLL that might have been added in a version after v24.3, "libexpat-1-ni.dll".
But that was harder to trace and the OpenSSL 1 vs OpenSSL 3 was the clue I needed.
To test this hypothesis, I upgrade everything to 2026 and NationalInstruments.DAQmx.dll successfully loaded.
Since I can't use the latest version, I then had to completely wipe all NI stuff again. This time, I also removed all shared library DLLs manually.
Reinstalled DAQmx 17, and it works!
There's gotta be a way to cleanly uninstall and remove the NI shared library DLLs in System32.
Did I miss something?
I wasted 2 weeks on this... I hope no one else does.