From 11:00 PM CST Friday, Feb 14th - 6:30 PM CST Saturday, Feb 15th, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From 11:00 PM CST Friday, Feb 14th - 6:30 PM CST Saturday, Feb 15th, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
01-25-2023 09:50 AM
Hello,
I have developed a windows dll in c# with Visual Studio based on -NET 4.7.2 and it works perfectly.
When I tried to make the same library class for .net framework 6.0 I get the following exception:
System.IO.FileNotFoundException: 'Could not load file or assembly 'NationalInstruments.Common, Version=13.5.40.173, Culture=neutral, PublicKeyToken=dc6ad606294fc298'. The system cannot find the file specified.'
has anyone have faced this issue?
Thanks for your help,
Andrea
05-31-2023 07:09 PM
Yes I had this exact same thing just happen to me, down to the version of NationaInstruments.Common. I also didn't have any issues until upgrading to .NET 6. Did you happen to find a solution?
08-01-2023 05:20 AM
Are there any updates?
I also have the exact same exception. I assume nationalinstruments.common.dll might not be compatible with .NET, I referenced the NationalInstruments.Visa and Ivi.Visa dlls in a .NET 6 app as well as .netstandard2.0 class library and got the same exception. Interestingly I could only find nationalinstruments.common.dll with version 19.1.40.49152 and couldn't find anywhere 13.5.40.173 on my system. When referencing these two libraries in .NET Framework (4.8), everything works as expected.
If you can locate the nationalinstruments.common.dll with version 13.5.40.173 somewhere and explicitly reference it in your app should solve this issue.
08-01-2023 07:48 AM
I guess I found a solution.
I was getting this exception when I call the `Open()` function on the `ResourceManager`
using var rmSession = new ResourceManager();
try {
var mbSession = (MessagedBasedSession)rmSession.Open(<resourceName>);
} catch {
}
So, I located the nationalinsturments.common.dll (e.g., "C:\\Program Files (x86)\\National Instruments\\Measurement Studio\\DotNET\\v4.0\\AnyCPU\\NationalInstruments.Common 19.1.40\\NationalInstruments.Common.dll") and added this line before calling any NiVisa function
Assembly.LoadFrom("<nationalinstruments.common.dll file path>");
09-18-2023 09:36 PM
朋友你好,.net 6 的确存在这样的问题,所以你需要添加一个NationalInstruments.Common引用,然后就可以正常编译使用了。
10-23-2024 03:15 AM
Hello, I've had exactly the same problem and found another way to solve it. Maybe it'll help somebody.
I just did a clean and re-imported my assemblies all from the same directory. Something must have gone wrong in the links since I added the assemblys one after another and from differents locations (Program Files x86 and Documents)