upgrading from .net framework 4.5.2 to .net standard 2.0

Gurdeep Singh 1 Reputation point
2021-12-20T10:42:04.377+00:00

Hi,

I'm trying to upgrade my class libraries from .Net Framework 4.5.2 to .Net Standard 2.0 using Upgrade Assistant. Everytime i does it, it upgrades to the latest version i.e. .Net6 Can I somehow pass an argument to CLI for 2.0? For the time being, i'm upgrading it to latest then changing it to .netstandard2.0 in .csproj file (not really sure if anything else is also required).

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,793 questions
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,507 questions
.NET Runtime
.NET Runtime
.NET: Microsoft Technologies based on the .NET software framework.Runtime: An environment required to run apps that aren't compiled to machine language.
1,152 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Ken Tucker 5,851 Reputation points
    2021-12-20T10:52:54.797+00:00

    Since .net 5 and newer are fully cross platform there is no longer development on .net standard. I would only use .net standard if you need the class library to work with .net framework, and .net core or .net

    https://devblogs.microsoft.com/dotnet/the-future-of-net-standard/

    1 person found this answer helpful.
    0 comments No comments

  2. Rijwan Ansari 746 Reputation points MVP
    2022-02-05T15:08:44.39+00:00

    Hi @Gurdeep Singh

    It is not wise to migrate into .NET Standard 2.0 as it is already announced that there won't be any new version after .NET Standard 2.1 but only .NET 5+. .NET 5+ replaces the .NET Standard.
    There will be no new .NET Standard versions after 2.1. For more information, see .NET 5+ and .NET Standard .
    Please check the future of .NET standard
    https://devblogs.microsoft.com/dotnet/the-future-of-net-standard/.

    Since, you are migrating better to go for latest version .NET 6.

    However, if it is your requirement, then you can migrate to .NET 6 with the Upgrade Assistant. Then, downgrade to .NET Standard 2.0 from the project properties.

    1 person found this answer helpful.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.