I am using the Microsoft TFS API and one of the properties on one of the interfaces has been marked as Obsolete and it instructs me to use a different property. Unfortunately the property the API wants me to use is used by TFS2010 and not TFS2008.
I have tried doing this:
#pragma warning disable 0612, 0618
request.CommandLineArguments = arguments;
#pragma warning restore 0612, 0618
[Obsolete("This property has been deprecated. Please remove all references. To pass command line arguments to MSBuild.exe, set the ProcessParameters property.", true)]
Following works for me:
#pragma warning disable 612,618 request.CommandLineArguments = arguments; #pragma warning restore 612,618
notice no leading 0 in the numbers
EDIT: Okay, your assembly has the "true" argument in the ObsoleteAttribute constructor. This means you can't use the property and not get an error.
If you can't re-write your code to avoid using this property, you'll have to invoke the property setter via reflection, for example:
request.GetType().GetProperty("Number").SetValue(request, arguments, null);
and getting is similar: