File tree 4 files changed +9
-29
lines changed
4 files changed +9
-29
lines changed Original file line number Diff line number Diff line change 14
14
<PackageTags >Incremental;Loading;Collection;IncrementalLoadingCollection;String;Array;Extensions;Helpers</PackageTags >
15
15
</PropertyGroup >
16
16
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
-
22
17
<!-- Necessary polyfills -->
23
18
<PropertyGroup >
24
19
<PolySharpIncludeGeneratedTypes >
Original file line number Diff line number Diff line change 15
15
</PropertyGroup >
16
16
17
17
<Choose >
18
- <When Condition =" '$(TargetFramework)' == 'netstandard2.0'" >
19
18
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'" >
21
21
<ItemGroup >
22
22
<PackageReference Include =" System.Memory" Version =" 4.5.5" />
23
23
</ItemGroup >
24
24
</When >
25
25
26
+ <!-- .NET Standard 2.1 doesn't have the Unsafe type -->
26
27
<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 -->
32
28
<ItemGroup >
33
29
<PackageReference Include =" System.Runtime.CompilerServices.Unsafe" Version =" 6.0.0" />
34
30
</ItemGroup >
35
31
</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 >
43
32
</Choose >
44
33
45
34
<!-- Necessary polyfills -->
Original file line number Diff line number Diff line change 42
42
</ItemGroup >
43
43
</When >
44
44
45
+ <!-- .NET Standard 2.1 doesn't have the Unsafe type -->
45
46
<When Condition =" '$(TargetFramework)' == 'netstandard2.1'" >
46
-
47
- <!-- .NET Standard 2.1 doesn't have the Unsafe type -->
48
47
<ItemGroup >
49
48
<PackageReference Include =" System.Runtime.CompilerServices.Unsafe" Version =" 6.0.0" />
50
49
</ItemGroup >
51
50
</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 >
60
51
</Choose >
61
52
62
53
<!-- Necessary polyfills -->
Original file line number Diff line number Diff line change 2
2
<Project >
3
3
<Import Project =" ..\Directory.Build.targets" />
4
4
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
+
5
10
<!-- Configure trimming for projects on .NET 6 and above -->
6
11
<PropertyGroup Condition =" '$(TargetFramework)' == 'net6.0' OR '$(TargetFramework)' == 'net7.0'" >
7
12
<EnableTrimAnalyzer >true</EnableTrimAnalyzer >
You can’t perform that action at this time.
0 commit comments