Skip to content

Commit

Permalink
Only disable EOL SDK warning on net5.0; sort features
Browse files Browse the repository at this point in the history
  • Loading branch information
paulirwin committed Mar 13, 2024
1 parent a01c0f4 commit 0d2c711
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
<!-- Features in .NET 6.x, .NET 7.x, and .NET 8.x only -->
<PropertyGroup Condition=" $(TargetFramework.StartsWith('net6.')) Or $(TargetFramework.StartsWith('net7.')) Or $(TargetFramework.StartsWith('net8.')) ">

<DefineConstants>$(DefineConstants);FEATURE_SPANFORMATTABLE</DefineConstants>
<DefineConstants>$(DefineConstants);FEATURE_RANDOM_NEXTINT64_NEXTSINGLE</DefineConstants>
<DefineConstants>$(DefineConstants);FEATURE_SPANFORMATTABLE</DefineConstants>

</PropertyGroup>

Expand Down
5 changes: 4 additions & 1 deletion TestTargetFramework.props
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,12 @@
<IsTestProject>true</IsTestProject>
</PropertyGroup>

<PropertyGroup Label="Warnings to be Disabled in Test Projects">
<PropertyGroup Label="net5.0 Warnings to be Disabled in Test Projects" Condition=" '$(TargetFramework)' == 'net5.0' ">
<!-- We purposely test on EoL frameworks for testing netstandard2.1, but we want to keep this warning in production code. -->
<CheckEolTargetFramework>false</CheckEolTargetFramework>
</PropertyGroup>

<PropertyGroup Label="Warnings to be Disabled in Test Projects">

<NoWarn Label="Nested types should not be visible">$(NoWarn);CA1034</NoWarn>
<NoWarn Label="Use Literals Where Appropriate">$(NoWarn);CA1802</NoWarn>
Expand Down

0 comments on commit 0d2c711

Please sign in to comment.