12-05-2012 02:13 AM
Hi,
I have error message when i tried to start debugging this Rigol C# example. Following image is the error message which i get from V C# express 2010. Please advice.
Error 4 The type 'NationalInstruments.ISupportSynchronizationContext' is defined in an assembly that is not referenced. You must add a reference to assembly 'NationalInstruments.Common, Version=9.0.40.362, Culture=neutral, PublicKeyToken=dc6ad606294fc298'.
D:\Profiles\PDMC34\My Documents\Visual Studio 2010\Projects\RIGOL\Rigol NI-VISA Example\Form1.cs 31 37 Rigol NI-VISA Example
Error 5 The type 'NationalInstruments.ISynchronizeCallbacks' is defined in an assembly that is not referenced. You must add a reference to assembly 'NationalInstruments.Common, Version=9.0.40.362, Culture=neutral, PublicKeyToken=dc6ad606294fc298'. D:\Profiles\PDMC34\My Documents\Visual Studio 2010\Projects\RIGOL\Rigol NI-VISA Example\Form1.cs 31 37 Rigol NI-VISA Example
12-05-2012 01:03 PM
Do as it says and add the references.
12-07-2012 01:26 PM
It looks like NationalInstruments.Common is already added to the references. This error is actually a result of the version of the .NET framework that the project is configured for. Measurement Studio assemblies do not support the Client Profile version of the .NET framework. Instead, you must configure your application to use the full .NET framework.
In Project Properties, change the Target Framework setting under the Application tab to ".NET Framework 4" instead of ".NET Framework 4 Client Profile".
Unfortunately, we do not have a way to improve upon the errors that you are seeing because they are general .NET errors. However, if you use the Measurement Studio templates, they will be configured to use the full .NET framework. Or if you add the Measurement Studio assemblies through the Add/Remove .NET Class Libraries option in the Measurement Studio menu, then we will provide a warning that you should update to the Full framework.