.NET standard versions 1.0 through 1.6 include the implementation assemblies. This is bad as it will pull those references into deps.json and other dependency locations and could get flagged by scanners. While customers can still target those versions if they want, we recommend they upgrade to 2.0 or 2.1.
Customers could target .NET Standard 1.0 through 1.6 without issue.
New behavior
warning NETSDK1215: Targeting .NET Standard prior to 2.0 is no longer recommended. See https://aka.ms/dotnet/dotnet-standard-guidance for more details.
Type of breaking change
[ ] Binary incompatible: Existing binaries may encounter a breaking change in behavior, such as failure to load or execute, and if so, require recompilation.
[ ] Source incompatible: When recompiled using the new SDK or component or to target the new runtime, existing source code may require source changes to compile successfully.
[X] Behavioral change: Existing binaries may behave differently at run time.
Update your TargetFramework property to netstandard2.0 or netstandard2.1. If required to stay on an older .NET Standard, you can set <CheckNotRecommendedTargetFramework>false</CheckNotRecommendedTargetFramework> in your project or Directory.Build.props
Description
.NET standard versions 1.0 through 1.6 include the implementation assemblies. This is bad as it will pull those references into deps.json and other dependency locations and could get flagged by scanners. While customers can still target those versions if they want, we recommend they upgrade to 2.0 or 2.1.
More information is available at https://aka.ms/dotnet/dotnet-standard-guidance
Version
.NET 9 Preview 6
Previous behavior
Customers could target .NET Standard 1.0 through 1.6 without issue.
New behavior
warning NETSDK1215: Targeting .NET Standard prior to 2.0 is no longer recommended. See https://aka.ms/dotnet/dotnet-standard-guidance for more details.
Type of breaking change
Reason for change
https://github.com/dotnet/designs/blob/main/accepted/2024/net-standard-recommendation.md
Recommended action
Update your TargetFramework property to netstandard2.0 or netstandard2.1. If required to stay on an older .NET Standard, you can set
<CheckNotRecommendedTargetFramework>false</CheckNotRecommendedTargetFramework>
in your project or Directory.Build.propsFeature area
SDK
Affected APIs
No response