I ran into this issue today with XmlEncode. It exists in both DotNetNuke.Common.Globals and was moved to DotNetNuke.Common.Utilities.XmtUtils (around version 3.x in 2005).
The trouble is that you cannot use both imports at the same time as the compiler sees an ambiguous reference. Unless the coder knows the specific issue and infers the proper namespace, there is a 50-50 chance of using the wrong namespace. Sure you can prefixthe function with XmlUtils.XmlEncode but that is just too much work for future code because we are holding on to something that should have been removed 7 years ago. In fact, keeping it around just encourages the opportunity to use the deprecated function wrapper.
This is a very common refactoring issue. A simple test is to rename to the function and rebuild the solution. As it stands DotNetNuke 6.2.1 is not affected, but it may affect third party modules. The resolution for the breaking change is adding a simple imports/using to DotNetNuke.Common.Utilitis.XmlUtils.
If you want to impress new DotNetNuke developers, we must clean up this mess. Imagine from their point of view that adding a single imports/using statement breaks their code from compiling. As for seasoned DNN developers, I don’t think DNN has ever been released with a clean build without warnings (or pragmas to hide the actual coding problem).
This brings up a best practice or standard for documenting deprecated functions. Always include the version it was deprecated and a helpful hint of what namespace is to be used instead. Here are some examples I discovered in a few minutes:
Warning 'DotNetNuke.Entities.Users.UserMembership.Email' is obsolete:'"Deprecated in DNN5.1"'
FAIL: What replaced it?
BETTER:'DotNetNuke.Entities.Users.UserInfo.Membership.Email deprecated in DNN 5.1Please use UserInfo.Email instead.'
Warning'DotNetNuke.Security.Roles.RoleController.GetRolesByUser(int, int)' isobsolete: '"Deprecated in DotNetNuke6.2."'
FAIL: Please give us a hint.
Warning 'DotNetNuke.Security.Roles.RoleProvider.GetRole(int, string)' isobsolete: '"Deprecated in DotNetNuke 6.2. Roles are cached in the businesslayer"'
FAIL: Business layer? What? Where? Huh?
Warning 'System.Net.WebProxy.GetDefaultProxy()' isobsolete: 'This method has been deprecated. Please use the proxy selected for you by default. http://go.microsoft.com/fwlink/?linki...
OK: That helps a bit.
What we really need is a standard such as
[Obsolete("Deprecatedin 5.0. Please use `useful`instead." )]
Lastly, every new major version revision should eliminate EVERY obsolete function from previous versions. There is no excuse to keep these around unless you really want to cause grief and scare developers away.