Will .NET Standard Support .NET 6?

Greg Finzer 21 Reputation points
2021-11-15T21:59:26.753+00:00

I have an open source library that currently targets .NET Standard 2.1 which is compatible with .NET 5.0.
https://github.com/GregFinzer/Compare-Net-Objects

According to this documentation there is no version of .NET Standard that is compatible with .NET 6.0
https://learn.microsoft.com/en-us/dotnet/standard/net-standard

Will I need to do a separate target of .NET 6.0 or will there be a future version of .NET Standard that will be compatible with .NET 6.0?

Thanks,
Greg

.NET
.NET
Microsoft Technologies based on the .NET software framework.
4,107 questions
0 comments No comments
{count} votes

Accepted answer
  1. Jiachen Li-MSFT 33,451 Reputation points Microsoft Vendor
    2021-11-16T07:38:16.34+00:00

    Hi @Greg Finzer ,
    https://dotnet.microsoft.com/platform/dotnet-standard
    According to this document, .NET 6 supports .NET Standard 2.1.
    Future versions of .NET will also support .NET Standard 2.1 and earlier versions ,existing .NET Standard versions will work forever
    Also check :
    https://devblogs.microsoft.com/dotnet/the-future-of-net-standard/

    Hope this could be helpful.
    Best Regards.
    Jiachen Li

    ----------

    If the answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Bruce (SqlWork.com) 71,506 Reputation points
    2021-11-15T23:31:22.9+00:00

    line .net 5, .net 6 supports both .netstandard 1.0 to 2.1.

    But .net standard is a dead technology. it was originally meant to define a cross platform api, so code could be shared between the old framework, mono, unitity and .net core. 2.1 is the last version of .net standard, and .net standard 2.0 is the last supported by .net48

    the .net standard approach has been replaced by targeted frameworks. frameworks can be O/S specific.

    another change, is the C# language version and frameworks are lock stepped. .netstandard 2.0 is c#7.3, .netstandard 2.1 is c# 8.0, .net5 is c# 9, and .net6 is c#10. This allows the compiler/runtime to support new datatypes and code operations with each release.

    Your library will work fine with .net 6. one caveat, as it is an object clone library, it may not support newer datatypes not defined in C# 8.0, like native integers or records. I haven't review the code closely, but it may also have issues with init only properties.

    1 person found this answer helpful.
    0 comments No comments

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.