Advice about using netstandard2.0 or net5.0 (or newer) is unclear
- Dominant language
- No language data
- Stars
- 4.8k
- Forks
- 6.1k
- Avg merge
- 15h 21m
- Merged PRs (30d)
- 370
Description
Hello!
This page says that a library author should target `netstandard2.0` and ALSO `net5.0` if they need that specific functionality.
But [other documentation about netstandard](https://docs.microsoft.com/en-us/dotnet/standard/net-standard?tabs=net-standard-1-0#when-to-target-net50-or-net60-vs-netstandard) says otherwise:
> If you don't need to support .NET Framework, you could go with .NET Standard 2.1 or .NET 5/6. We recommend you skip .NET Standard 2.1 and go straight to .NET 6.
I think this should be cleared up. And I think it would be good to only have 1 source of truth, perhaps one of these 2 pages need to have a reference to each other?
Also, should net5.0 be targeted? That's EOL...
I also think a table like this would be useful (example):
| goal | recommended versions (.netstandard, net6.0, etc..) | | | |
|------------------------------------------------------|----------------------------------------------------|---|---|---|
| create a new library that uses asp.net core features | RECOMMENDATIONS HERE | | | |
| create a library that supports .net framework | recommendations here | | | |
| create a library that supports the newest platforms | recommendations here | | | |
---
#### Document Details
⚠ *Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.*
* ID: 5b3638c9-ea3c-1c9e-2763-5c3e8e965663
* Version Independent ID: aff99d6b-9471-9277-160b-670ee8028b53
* Content: [Cross-platform targeting for .NET libraries](https://docs.microsoft.com/en-us/dotnet/standard/library-guidance/cross-platform-targeting)
* Content Source: [docs/standard/library-guidance/cross-platform-targeting.md](https://github.com/dotnet/docs/blob/main/docs/standard/library-guidance/cross-platform-targeting.md)
* Product: **dotnet-fundamentals**
* GitHub Login: @JamesNK
* Microsoft Alias: **jamesnk**
Contributor guide
Assessment
This issue has not been assessed yet.