Obsolete Method Warning Using the NI-SCOPE .NET Class Library

Updated May 25, 2018

Reported In


  • NI-SCOPE .NET Class Libraries


  • Microsoft Visual Studio

Issue Details

I recently updated the NI-SCOPE driver and the NI-SCOPE .NET Class Library to the latest versions and now I see a warning with a message like the following warning:

'NationalInstruments.ModularInstruments.NIScope.ScopeTrigger.Configure(NationalInstruments.ModularInstruments.NIScope.ScopeTriggerType, NationalInstruments.PrecisionTimeSpan)' is obsolete: 'This method is deprecated. Use one of the other methods on this class to configure for triggering.'


If you are using an obsolete method like ScopeTrigger.Configure, you have two alternatives:
1. Replace the obsolete method (recommended)
Instead of the obsolete method, use another method member of the corresponding class.

For example, if you are using the ScopeTrigger.Configure method to setup a DigitalEdge type trigger for your scope as
this.scopeSession.Trigger.Source = "RTSI0"

this.scopeSession.Trigger.Configure(ScopeTriggerType.DigitalEdge, new PrecisionTimeSpan());

use another method member of the ScopeTriggerClass like ScopeTrigger.ConfigureTriggerDigital as
this.scopeSession.Trigger.ConfigureTriggerDigital(ScopeTriggerSource.FromString("RTSI0"), ScopeTriggerSlope.Positive, NationalInstruments.PrecisionTimeSpan.Zero, NationalInstruments.PrecisionTimeSpan.Zero);

Refer to the NI-SCOPE .NET Class Library Help under NI-SCOPE .NET Class Library Help > NI-SCOPE .NET Class Library Reference > NationalInstruments.ModularInstruments.NIScope Namespace > ScopeTrigger Class > ScopeTrigger Methods and to the NI-SCOPE .NET shipping examples in <Public Documents>\National Instruments\NI-SCOPE\examples\DotNET 4.x for more information about the methods' syntax, parameters and overall use.
2. Ignore the warning
Obsolete methods are kept in the library for compatibility with older projects. The warning simply informs the user about a problem, but it will be possible to compile and execute the code without any problems like those you would see with an error. However, it is advisable to modify the code to replace any obsolete methods.


Not Helpful