-
Notifications
You must be signed in to change notification settings - Fork 1
/
Directory.Build.targets
30 lines (30 loc) · 1.57 KB
/
Directory.Build.targets
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?xml version="1.0" encoding="utf-8"?>
<Project>
<!--
Usage of the TargetFrameworkIdentifier and _TargetFrameworkVersionWithoutV
require the .NET Core SDK props files to have been included.
Therefore, the following Nullable Reference Type settings are moved to
the .targets file instead.
-->
<PropertyGroup Label="Nullable Reference Types">
<LangVersion>8</LangVersion>
<Nullable Condition="
('$(TargetFrameworkIdentifier)' == '.NETCoreApp' AND '$(_TargetFrameworkVersionWithoutV)' >= '3.0') OR
('$(TargetFrameworkIdentifier)' == '.NETStandard' AND '$(_TargetFrameworkVersionWithoutV)' >= '2.1')
">enable</Nullable>
<Nullable Condition="!(
('$(TargetFrameworkIdentifier)' == '.NETCoreApp' AND '$(_TargetFrameworkVersionWithoutV)' >= '3.0') OR
('$(TargetFrameworkIdentifier)' == '.NETStandard' AND '$(_TargetFrameworkVersionWithoutV)' >= '2.1')
)">annotations</Nullable>
</PropertyGroup>
<ItemGroup Label="Nullable helper library for Pre-.NET Standard 2.1"
Condition="!(
('$(TargetFrameworkIdentifier)' == '.NETCoreApp' AND '$(_TargetFrameworkVersionWithoutV)' >= '3.0') OR
('$(TargetFrameworkIdentifier)' == '.NETStandard' AND '$(_TargetFrameworkVersionWithoutV)' >= '2.1')
)">
<PackageReference Include="Nullable" Version="1.3.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>
</Project>