question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Review the list of obsolete types and see whether we can remove any of these in .NET 6

See original GitHub issue

For .NET 6, we’d like to evaluate the APIs marked as obsolete and remove them if necessary. There’s ~130 APIs marked as obsolete that are split up based on project area in the table below. The goal is to have these APIs removed by preview1 so we have time to get feedback on our decision early on in the release.

What to do

  • If it should be removed
    • Remove it
    • Update any samples/tests that use the obsolete API.
  • If it should not be removed:
    • Add an inline comment explaining why and provide a timeline for removal if possible
    • Ensure that the Obsolete description provides information about alternative APIs or guidelines on what the user should do otherwise.
    • Provide an aka.ms link to the deprecation announcement.

Who is doing it

Area Assigned Done?
Azure AD @HaoK, @JunTaoLuo, @javiercn https://github.com/dotnet/aspnetcore/pull/27955
Hosting @Tratcher, @halter73 https://github.com/dotnet/aspnetcore/issues/27529#issuecomment-748288221
Http @Tratcher, @jkotalik , @halter73 https://github.com/dotnet/aspnetcore/pull/28890
Middleware @Tratcher, @HaoK, @halter73 https://github.com/dotnet/aspnetcore/pull/28893
MVC @pranavkm, @javiercn, @captainsafia https://github.com/dotnet/aspnetcore/pull/28337
Razor @ajaybhargavb, @captainsafia https://github.com/dotnet/aspnetcore/pull/28706
Servers @jkotalik, @halter73 #29275
SignalR @BrennanConroy https://github.com/dotnet/aspnetcore/pull/28100

Things to keep in mind @halter73 and @captainsafia took a look at all the APIs and made the following list of things to consider when evaluating whether or not an Obsoleted API should be removed.

  • Outside of redundancy, is there another harm to having the API around? For example, it is not performant or not supported by other parts of the ecosystem.
  • What’s the maintenance cost of keeping the API around? This includes things like the number of issues reported by users, whether there’s a lot of flaky tests associated with the API, etc.
  • Does the Obsoleted API no longer work?
  • How common is the API that is being obsoleted? Is it likely a new user will inadvertently use it and run into issues?
  • Is it actually a shipped API?
  • When was the API obsoleted? If it was obsoleted in .NET 5, keep it around to make upgrading between LTS releases, from 3.1 to 6, easier for devs.
  • Is this API commonly used by other packages?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

3reactions
javiercncommented, Nov 18, 2020

We should consider adding aka.ms links to the obsolete message that point to a landing doc (the announcement?) and that suggest alternatives.

2reactions
Pilchiecommented, Nov 17, 2020

Also to keep in mind - if the API was first marked Obsolete in .NET 5.0, we might consider keeping it for .NET 6 to make it easier for people to upgrade from LTS to LTS (.NET Core 3.1 -> .NET 6.0).

Read more comments on GitHub >

github_iconTop Results From Across the Web

What's obsolete in .NET Framework
See how the .NET Framework class library marks members as obsolete. ... This makes it difficult to simply remove a type or a...
Read more >
Obsolete in services.AddGraphQL · Issue #2856 · graphql- ...
I am using version 4.7.1 in .net & and now Visual studio shows a warning that services.AddGraphQL is obsolete, but I couldn't find...
Read more >
Bring Your .NET Apps Forward with the .NET Upgrade ...
After applying this step, you can see that the <TargetFramework> property of the project file has been updated to net6.0 (representing .NET 6.0...
Read more >
How do we encourage edits to obsolete/out of date answers?
This is a great solution to the above problem when the original author doesn't want to edit their obsolete answer, but we run...
Read more >
Is there a tool for finding unreferenced functions (dead ...
This is because they detect not only unused types and methods, but also types and methods used only by unused dead types and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found