2

I have been tasked with recompiling an application from .net 1.1 to .net 4.0.

I have been told to not make any code changes - however with all the changes through the versions of the framework - I am reluctant to leave in methods that are marked as Obsolete.

Microsoft's website states that obsolete methods are left in for backwards compatability with the previous framework version but also as a warning that in the future they will be removed - my question "When will they be removed?"

2

3 Answers 3

2

There is no set time frame for when a particular Obsolete method will be removed. Generally the process of removing a method goes as follows

  • Mark the method as Deprecated in a major release
  • Mark the method as Obsolete in a future major release
  • Remove the method in a future major release

Given that there are only 4 major release of .Net 4.0 is really the first version where a method could be removed by this process. I don't know off hand how many, or any, methods have actually been removed from the BCL but I suspect the number is small.

3
  • This was my concern. I was hoping there was a plan for say functionality that became deprecated in 2.0, to be phased out(obsolete 3.0, removed 4.0). However it still works in 4.0 so do i persist with it as the client does not want changes to the code. My argument that it will be removed at some point but i dont know when is pretty weak. I know it needs to be removed and recoded but the business is reluctant to change. I am wary as 4.5 is around the corner, if i leave the functionality in and it is removed in 4.5, the project of preparing for the future instantly becomes a failure.
    – Ben
    Jan 6, 2012 at 10:16
  • @Ben I'd say it's very unlikely an API would every be removed in a point release. That would be too much of a breaking change. I would only expect it to be removed in a major release (but then again, I don't make the rules :) ).
    – JaredPar
    Jan 6, 2012 at 16:02
  • i have downloaded the Dev previews of 4.5 and all functionailty that i have showing as obsolete is still present and working - so at least i am safe for a couple of years :-)
    – Ben
    Jan 6, 2012 at 16:09
1

That's up to MS, but my guess is never unless they are broken.

MS places a high priority on backwards compatibility.

0

I don't think this is known or published in advance, it's just a heads up that they might disappear in a future release.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.