File tree Expand file tree Collapse file tree 4 files changed +9
-29
lines changed Expand file tree Collapse file tree 4 files changed +9
-29
lines changed Original file line number Diff line number Diff line change 1414 <PackageTags >Incremental;Loading;Collection;IncrementalLoadingCollection;String;Array;Extensions;Helpers</PackageTags >
1515 </PropertyGroup >
1616
17- <!-- .NET Standard 2.1 and .NET 6 already have [NotNullIfNotNull] and [NotNullWhen] -->
18- <PropertyGroup Condition =" '$(TargetFramework)' == 'net6.0'" >
19- <DefineConstants >NETSTANDARD2_1_OR_GREATER</DefineConstants >
20- </PropertyGroup >
21-
2217 <!-- Necessary polyfills -->
2318 <PropertyGroup >
2419 <PolySharpIncludeGeneratedTypes >
Original file line number Diff line number Diff line change 1515 </PropertyGroup >
1616
1717 <Choose >
18- <When Condition =" '$(TargetFramework)' == 'netstandard2.0'" >
1918
20- <!-- .NET Standard 2.0 doesn't have the Span<T> type -->
19+ <!-- .NET Standard 2.0 doesn't have the Span<T> type -->
20+ <When Condition =" '$(TargetFramework)' == 'netstandard2.0'" >
2121 <ItemGroup >
2222 <PackageReference Include =" System.Memory" Version =" 4.5.5" />
2323 </ItemGroup >
2424 </When >
2525
26+ <!-- .NET Standard 2.1 doesn't have the Unsafe type -->
2627 <When Condition =" '$(TargetFramework)' == 'netstandard2.1'" >
27- <PropertyGroup >
28- <DefineConstants >NETSTANDARD2_1_OR_GREATER</DefineConstants >
29- </PropertyGroup >
30-
31- <!-- .NET Standard 2.1 doesn't have the Unsafe type -->
3228 <ItemGroup >
3329 <PackageReference Include =" System.Runtime.CompilerServices.Unsafe" Version =" 6.0.0" />
3430 </ItemGroup >
3531 </When >
36-
37- <!-- For the .NET 6 target, simply define NETSTANDARD2_1_OR_GREATER too -->
38- <When Condition =" '$(TargetFramework)' == 'net6.0'" >
39- <PropertyGroup >
40- <DefineConstants >NETSTANDARD2_1_OR_GREATER</DefineConstants >
41- </PropertyGroup >
42- </When >
4332 </Choose >
4433
4534 <!-- Necessary polyfills -->
Original file line number Diff line number Diff line change 4242 </ItemGroup >
4343 </When >
4444
45+ <!-- .NET Standard 2.1 doesn't have the Unsafe type -->
4546 <When Condition =" '$(TargetFramework)' == 'netstandard2.1'" >
46-
47- <!-- .NET Standard 2.1 doesn't have the Unsafe type -->
4847 <ItemGroup >
4948 <PackageReference Include =" System.Runtime.CompilerServices.Unsafe" Version =" 6.0.0" />
5049 </ItemGroup >
5150 </When >
52-
53- <When Condition =" '$(TargetFramework)' == 'net6.0' OR '$(TargetFramework)' == 'net7.0'" >
54-
55- <!-- NETSTANDARD2_1_OR_GREATER: includes both .NET Standard 2.1 and .NET 6 and above -->
56- <PropertyGroup >
57- <DefineConstants >NETSTANDARD2_1_OR_GREATER</DefineConstants >
58- </PropertyGroup >
59- </When >
6051 </Choose >
6152
6253 <!-- Necessary polyfills -->
Original file line number Diff line number Diff line change 22<Project >
33 <Import Project =" ..\Directory.Build.targets" />
44
5+ <!-- Define NETSTANDARD2_1_OR_GREATER for .NET Standard 2.1 targets and above -->
6+ <PropertyGroup Condition =" '$(TargetFramework)' == 'net6.0' OR '$(TargetFramework)' == 'net6.0' OR '$(TargetFramework)' == 'net7.0'" >
7+ <DefineConstants >NETSTANDARD2_1_OR_GREATER</DefineConstants >
8+ </PropertyGroup >
9+
510 <!-- Configure trimming for projects on .NET 6 and above -->
611 <PropertyGroup Condition =" '$(TargetFramework)' == 'net6.0' OR '$(TargetFramework)' == 'net7.0'" >
712 <EnableTrimAnalyzer >true</EnableTrimAnalyzer >
You can’t perform that action at this time.
0 commit comments