-
Notifications
You must be signed in to change notification settings - Fork 595
Expand file tree
/
Copy pathDirectory.Build.props
More file actions
103 lines (90 loc) · 4.58 KB
/
Directory.Build.props
File metadata and controls
103 lines (90 loc) · 4.58 KB
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
<?xml version="1.0" encoding="utf-8"?>
<Project>
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<NoWarn>$(NoWarn);SA0001</NoWarn>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
</PropertyGroup>
<PropertyGroup>
<NoWarn>$(NoWarn);CS0436</NoWarn>
<!-- We want to use experimental APIs internally -->
<NoWarn>$(NoWarn);OOXML0001;OOXML0002;OOXML0003;OOXML0004</NoWarn>
</PropertyGroup>
<PropertyGroup>
<ArtifactsPath>$(MSBuildThisFileDirectory)artifacts</ArtifactsPath>
</PropertyGroup>
<PropertyGroup>
<IncludeSourceGenerator>false</IncludeSourceGenerator>
</PropertyGroup>
<PropertyGroup>
<AccelerateBuildsInVisualStudio>true</AccelerateBuildsInVisualStudio>
</PropertyGroup>
<PropertyGroup>
<InformationalVersion>$(GitVersion_InformationalVersion)</InformationalVersion>
<FileVersion>$(GitVersion_MajorMinorPatch)</FileVersion>
<AssemblyVersion>$(GitVersion_AssemblySemVer)</AssemblyVersion>
<Version>$(GitVersion_NuGetVersionV2)</Version>
</PropertyGroup>
<!-- Due to the need to test .NET 3.5 and .NET 4.0 builds, we have separate configurations that
allow us to build and test them. These are mostly done in CI, but may be useful at dev time. -->
<Choose>
<When Condition=" '$(ProjectLoadStyle)' == 'net35' ">
<PropertyGroup>
<!-- We have some internal types that conflict -->
<NoWarn>$(NoWarn);CS1685</NoWarn>
<ProductTargetFrameworks>net35</ProductTargetFrameworks>
<FrameworkTargetFrameworks>net35</FrameworkTargetFrameworks>
<TestTargetFrameworks>net472</TestTargetFrameworks>
<AssetsTargetFrameworks>net472</AssetsTargetFrameworks>
<LatestTargetFramework>net472</LatestTargetFramework>
<SamplesFrameworks>net472</SamplesFrameworks>
<DefineConstants>$(DefineConstants);FEATURE_NO_VALIDATOR_CANCELLATIONTOKEN</DefineConstants>
</PropertyGroup>
</When>
<When Condition=" '$(ProjectLoadStyle)' == 'net40' ">
<PropertyGroup>
<!-- We have some internal types that conflict -->
<NoWarn>$(NoWarn);CS1685</NoWarn>
<ProductTargetFrameworks>net40</ProductTargetFrameworks>
<FrameworkTargetFrameworks>net40</FrameworkTargetFrameworks>
<TestTargetFrameworks>net472</TestTargetFrameworks>
<AssetsTargetFrameworks>net472</AssetsTargetFrameworks>
<LatestTargetFramework>net472</LatestTargetFramework>
<SamplesFrameworks>net472</SamplesFrameworks>
</PropertyGroup>
</When>
<Otherwise>
<PropertyGroup>
<ProductTargetFrameworks>netstandard2.0;net10.0;net8.0;net35;net40;net46</ProductTargetFrameworks>
<FrameworkTargetFrameworks>netstandard2.0;net10.0;net6.0;net8.0;net35;net40;net46</FrameworkTargetFrameworks>
<AssetsTargetFrameworks>netstandard2.0;net472</AssetsTargetFrameworks>
<TestTargetFrameworks>net8.0;net10.0</TestTargetFrameworks>
<TestTargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">$(TestTargetFrameworks);net472</TestTargetFrameworks>
<LatestTargetFramework>net10.0</LatestTargetFramework>
<SamplesFrameworks>net8.0;net10.0</SamplesFrameworks>
<SamplesFrameworks Condition=" '$(OS)' == 'Windows_NT' ">$(SamplesFrameworks);net472</SamplesFrameworks>
<DefineConstants Condition=" '$(TargetFramework)' != 'net35' And '$(TargetFramework)' != 'net40' And '$(TargetFramework)' != 'net46' And '$(TargetFramework)' != 'net472' ">$(DefineConstants);TASKS_SUPPORTED</DefineConstants>
</PropertyGroup>
</Otherwise>
</Choose>
<PropertyGroup>
<SupportsNetStandard>false</SupportsNetStandard>
<SupportsNetStandard Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'netstandard2.0'))">true</SupportsNetStandard>
<IsFramework>false</IsFramework>
<IsFramework Condition=" '$(TargetFramework)' == 'net35' OR $(TargetFramework.StartsWith('net4')) ">true</IsFramework>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<PropertyGroup>
<LangVersion>latest</LangVersion>
</PropertyGroup>
<PropertyGroup>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)DocumentFormat.OpenXml.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<PropertyGroup>
<IsTestProject Condition=" '$(IsTestProject)' == '' ">false</IsTestProject>
<IsBenchmarkProject Condition=" '$(IsBenchmarkProject)' == '' ">false</IsBenchmarkProject>
</PropertyGroup>
</Project>