The last article concerned migration issues and their possible solutions. This part of the series talks about obsolete functionality in the latest version of the .NET Framework and what happens if you still need to use those functionalities.
Usage of obsolete types and members
Each new .NET Framework version adds new types and members that provide new functionality. Existing types and members change. Sometimes types are replaced because the technology that they where used for was deprecated. In other cases new types and members are more complete and easier to use.
To assure the highest possible compatibility with preceding versions, those obsolete types and members are not directly deleted. Instead they are marked as obsolete using the attribute “ObsoleteAttribute”. They still work even in the latest .NET Framework versions.
If code that is using obsolete types or members is recompiled, the compiler might raise warnings or in some cases even errors (which must be modified). Code that was compiled with an old version of the compiler and that uses obsolete types and members will however always execute correctly, even after the migration to the .NET 4.0 Framework.
Obsolete Types
- All types that reside in the System.Data.OracleClient namespace are deprecated. You should use the Oracle specific provider within ODP.NET.
- Passport authentification is not supported anymore, you should use the LiveID instead. All associated types are obsolete.
- All types in System.Web.Mail should not be used anymore, instead you should use those within the System.Net.Mail namespace.
- The System.Web.Mobile.dll assembly that was used for mobile development is deprecated.
- XmlDataDocument and XslTransform are deprecated, you should use XslCompiledTransform instead.
Obsolete Members
- Some methods in LINQ needed to be modified for the implementation of PLINQ (parallel processing within LINQ)
- Concerning the Entity Framework, the ApplyPropertyChanges function is replaced by the ApplyCurrentValues function and the SaveChanges function expects an enumeration as parameter instead of a Boolean value
- Multiple methods within System.Diagnostics.Process are replaced by their equivalents in 64 bits
- Members that were already obsolete since .NET Framework 2.0 still exist. They were not yet deleted (but should should not use them anymore in your developments).
Additional Information in MSDN
For further information on this subject and much more obsolete types and members, please visit Microsofts MSDN site:
http://msdn.microsoft.com/en-us/library/ee461503%28v=VS.100%29.aspx
http://msdn.microsoft.com/en-us/library/ee471421%28v=VS.100%29.aspx
No comments:
Post a Comment