How to choose the target version of .NET Standard library?

Technology CommunityCategory: .NET CoreHow to choose the target version of .NET Standard library?
VietMX Staff asked 3 years ago

When choosing a .NET Standard version, you should consider this trade-off:

  1. The higher the version, the more APIs are available to you.
  2. The lower the version, the more platforms implement it.

It’s recommended to target the lowest version of .NET Standard possible. So, after you find the highest .NET Standard version you can target, follow these steps:

  1. Target the next lower version of .NET Standard and build your project.
  2. If your project builds successfully, repeat step 1. Otherwise, retarget to the next higher version and that’s the version you should use.