Solution
The exclamation point occurs because Visual Studio cannot find the
NationalInstruments.Common.dll.
NationalInstruments.Common.dll could be located in one of the following directories:
C:\Program Files<(x86)>\National Instruments\<MeasurementStudioVS200X>\DotNET\Assemblies\Current where <MeasurementStudioVS200X> corresponds to your version of Visual Studio.
C:\Program Files<(x86)>\National Instruments\MeasurementStudio\DotNET\v4.x\AnyCPUIt should also be installed to the Global Assembly Cache (GAC) located in:
C:\WINDOWS\assemblyYou should also find the other National Instruments driver DLLs (
NationalInstruments.XXX.dll) from drivers installed on your computer located in these folders (e.g.
NationalInstruments.NI4882.dll,
NationalInstruments.DAQmx.dll, or
NationalInstruments.VisaNS.dll).
You can use the Reference Manager in Visual Studio to find the newest version of the DLL registered in the GAC. If you find the DLL there, you can see the path to where the DLL is on disk.
If the file is there and you still have the error, then make sure to add the references to the project. Do this by selecting
Project >>
Add Reference... >>
Browse... >> Select
NationalInstruments.Common.dll library. Make sure to also add the driver library (e.g.
NationalInstruments.DAQmx.dll or
NationalInstrument.4882.dll) in this manner and include the line of code that imports the libraries. See the shipping examples for this code. For example, if you are using NI-488.2 driver in Visual Basic, include
Imports NationalInstruments.NI4882 at the top of the code under the other Imports calls.
If you do not see the
NationalInstruments.Common.dll in these locations you will simply need to repair the NI Measurement Studio Common .NET Language Assemblies for the .NET Framework. To repair this software, follow these steps:
- Open the Control Panel.
- Open Add or Remove Programs.
- Find National Instruments Software and click Change.
- Find and highlight the NI Measurement Studio Common .NET Language Assemblies for the .NET Framework X.X under the NI Products section.
- Select the Repair button in order to reinstall any missing files.