-
-
Notifications
You must be signed in to change notification settings - Fork 47
/
Directory.Build.targets
42 lines (37 loc) · 2.03 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
31
32
33
34
35
36
37
38
39
40
41
42
<Project>
<PropertyGroup>
<!-- minimal, latest, preview -->
<RoslynVersion Condition="$(RoslynVersion) == ''">preview</RoslynVersion>
</PropertyGroup>
<!-- https://www.nuget.org/packages/Microsoft.CodeAnalysis.Analyzers/ -->
<!-- https://www.nuget.org/packages/Microsoft.CodeAnalysis.CSharp.Workspaces/ -->
<ItemGroup Condition="$(RoslynVersion) == 'minimal'">
<PackageReference Update="Microsoft.CodeAnalysis.Analyzers" Version="3.3.3" />
<!-- Consider removing CS0618 when updating this version -->
<PackageReference Update="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="3.8.0" />
</ItemGroup>
<PropertyGroup Condition="$(RoslynVersion) == 'minimal'">
<DefineConstants>$(DefineConstants);ROSLYN3;CSHARP9_OR_GREATER</DefineConstants>
<NoWarn>$(NoWarn);nullable</NoWarn>
</PropertyGroup>
<ItemGroup Condition="$(RoslynVersion) == 'latest'">
<PackageReference Update="Microsoft.CodeAnalysis.Analyzers" Version="3.3.3" />
<PackageReference Update="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.3.0" />
</ItemGroup>
<PropertyGroup Condition="$(RoslynVersion) == 'latest'">
<DefineConstants>$(DefineConstants);ROSLYN4;CSHARP9_OR_GREATER</DefineConstants>
<NoWarn>$(NoWarn);nullable</NoWarn>
</PropertyGroup>
<ItemGroup Condition="$(RoslynVersion) == 'preview'">
<PackageReference Update="Microsoft.CodeAnalysis.Analyzers" Version="3.3.4-beta1.22362.3" />
<PackageReference Update="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.4.0-1.final" />
</ItemGroup>
<PropertyGroup Condition="$(RoslynVersion) == 'preview'">
<DefineConstants>$(DefineConstants);ROSLYN4;CSHARP9_OR_GREATER;CSHARP10_OR_GREATER</DefineConstants>
<NoWarn>$(NoWarn);CS0618</NoWarn>
</PropertyGroup>
<!-- disable the nullable warnings when compiling for .NET Standard 2.0 -->
<PropertyGroup Condition="'$(TargetFramework)' == 'netstandard2.0' OR '$(TargetFramework)' == 'netcoreapp3.1' OR '$(TargetFramework)' == 'net462'">
<NoWarn>$(NoWarn);nullable</NoWarn>
</PropertyGroup>
</Project>