From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Please give better information when obsoleting methods

I've been updating some NI assemblies, and some methods and properties that our code uses have been obsoleted, which is fine.

 

What isn't fine is the obsolete message.  

 

Warning CS0618 'DaqSystem.ConnectSwitchChannels(string, string, bool)' is obsolete: 'This method is obsolete.'

I can tell the method is obsolete because I'm getting the CS0618 warning.  I don't need to be told twice.  What I do need is a hint to the replacement method / class / library.  For example, an appropiate obsolete message might be:

 

Warning CS0618 'DaqSystem.ConnectSwitchChannels(string, string, bool)' is obsolete: 
'Please use DaqSystem.ConnectSwitchChannels(Channel, Channel, bool) instead'

Note: I just made that replacement up as an example.  I have no idea what the replacement for ConnectSwitchChannels(string, string, bool) is.  Which is exactly the point, here.  Give the replacement when obsoleting code, or at least some hint as to where to go look for more information.

0 Kudos
Message 1 of 3
(3,498 Views)

Hi CurtisHx,

 

I agree this obsolescence message is redundant and unhelpful. We have filed a bug report for this behavior. 

 

I found a KB which may go part of the way to explain what happened here: http://digital.ni.com/public.nsf/allkb/639BFDBDB893EB5186257225007D0F58 . The KB explains that NI-SWITCH was decoupled from the NI-DAQmx API, and provides some help for migrating to NI-SWITCH. To find the correct version of NI-SWITCH for you, please take a look at this document: http://www.ni.com/product-documentation/52941/en/

 

Please let us know if you have any follow up questions.

 

Warm regards,

Daniel Dorroh
National Instruments
0 Kudos
Message 2 of 3
(3,461 Views)

Hi CurtisHx

 

If the KnowledgeBase article my colleague Daniel posted doesn't help you, I will also be checking this forum, so feel free to reply.

 

 

Andy F.
Applications Engineering
National Instruments
0 Kudos
Message 3 of 3
(3,458 Views)