10-13-2023 10:32 AM
I have written a C# .NET application for testing that accesses a Rigol power supply with an NI/IVI interface connection.
The app was working on my PC and the target PC with dependencies to:
Ivi.Visa.dll
NationalInstruments.Common.dll
NationalInstruments.Visa.dll
But I was told to use external libraries for the test equipment (power supply).
After the switch, the software is running, but not finding the dll's.
We decided to uninstall NI and start over, but now the Ivi.Visa.dll will not install.
The paths to the dll's needed are:
The middle entry is now missing. The last directory still installed is "Framework32". There is no "v2.0.50727" directory, though the "v4.0.30319" directory is present for the NI.Visa dll (first entry).
I found discussions in this forum saying to do a mod reinstall of NI-Visa, but that did not work. I have tried multiple reinstalls of every package I can find, both from the NI Package Manager and from the NI installer web page.
I tried just recreating the file path folders and placing the dll in the folder, but the app threw an exception stating there was insufficient location info.
How can I run an install that recreates the necessary path?
10-18-2023 11:28 PM
I am not familiar with NI-VISA at all, but looking at the NI-VISA installers, the 5.8 version of VISA.NET Shared Components was included in NI-VISA 17.0 through 18.5, so I would believe that if you are installing or repairing one of those versions of NI-VISA, you should be getting the 5.8 version of the 2.0 framework DLL.
As a quick test, I installed NI-VISA 17.0 from an ni.com download and it installed not using NI Package Manager and I see this file installed:
"C:\Program Files (x86)\IVI Foundation\VISA\Microsoft.NET\Framework32\v2.0.50727\VISA.NET Shared Components 5.8.0\Ivi.Visa.dll"
Seeing the file "C:\Program Files (x86)\IVI Foundation\VISA\Microsoft.NET\Framework32\v4.0.30319\NI VISA.NET 23.5\NationalInstruments.Visa.dll" referenced in your project, that suggests that the project was referencing the NI-VISA 2023 Q3 version of the DLL that was installed with NI Package Manager.
When I upgraded from NI-VISA 17.0 to 2023 Q3 I see the new "7.2" directory ("C:\Program Files (x86)\IVI Foundation\VISA\Microsoft.NET\Framework32\v2.0.50727\VISA.NET Shared Components 7.2.0\Ivi.Visa.dll") now and that is what 2023 Q3 installs. I still see the "5.8" directory because it is likely the NI-VISA MSI does NOT remove those files on upgrade.
So you might have to either use the new 7.2 version or install an older version of NI-VISA and add the files to your system.
If you want to discuss further, the answers to these questions might help:
10-19-2023 10:01 AM
Thanks Scott!
I expected the installer to reinstall the Ivi.Visa.dll, but so far it hasn't.
As far as I know there is nothing wrong with my computer and the paths to the dll already exist.
I have used both the NI Package Manager and the driver downloads from the NI site. Neither have worked.
Maybe there is some procedure I can use to reset my NI installation?
Just placing a copy of the dll in the path does not work. There is more to the installation than just the Ivi.Visa.dll.
When I attempt to run my app with just a copy of the dll in place, I get an exception for something called Ivi.VisaNative, but the location of that file is a mystery. I'm guessing that there are files installed by NI that are dependencies for the dll's.
10-19-2023 01:44 PM
The only suggestion that I have is to try installing NI-VISA 18.5 first and then 2023 Q3, if you have not already tried it?
Does your application require .NET 2.0 and the 5.8 version of the DLL? Can you recompile it to use .NET 4.0 API, and the 7.2 version of the DLL?
12-04-2023 11:55 AM
I wasn't able to install older versions of NI-VISA until I deleted all files and folders with IVI or NI in the name from the C\Program Files (x86) directory. Without deleting all the files/folders the installer would say that there was nothing to install.
Then I was able to install NI-VISA 15.5, 2023 Q3, and Measurement Studio.
That gave me the requisite DLL files, and everything looks fine now.
Thank you!
12-04-2023 11:58 AM
Glad to hear that you were successful and sharing the steps.