-
Notifications
You must be signed in to change notification settings - Fork 552
/
Directory.Build.props
109 lines (94 loc) · 4.4 KB
/
Directory.Build.props
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
104
105
106
107
108
109
<?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>net462</TestTargetFrameworks>
<AssetsTargetFrameworks>net462</AssetsTargetFrameworks>
<LatestTargetFramework>net462</LatestTargetFramework>
<SamplesFrameworks>net472</SamplesFrameworks>
</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>net462</TestTargetFrameworks>
<AssetsTargetFrameworks>net462</AssetsTargetFrameworks>
<LatestTargetFramework>net462</LatestTargetFramework>
<SamplesFrameworks>net472</SamplesFrameworks>
</PropertyGroup>
</When>
<Otherwise>
<PropertyGroup>
<ProductTargetFrameworks>netstandard2.0;net8.0;net35;net40;net46</ProductTargetFrameworks>
<FrameworkTargetFrameworks>netstandard2.0;net6.0;net8.0;net35;net40;net46</FrameworkTargetFrameworks>
<AssetsTargetFrameworks>netstandard2.0;net462</AssetsTargetFrameworks>
<TestTargetFrameworks>net8.0</TestTargetFrameworks>
<TestTargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">$(TestTargetFrameworks);net462</TestTargetFrameworks>
<LatestTargetFramework>net8.0</LatestTargetFramework>
<SamplesFrameworks>net8.0</SamplesFrameworks>
<SamplesFrameworks Condition=" '$(OS)' == 'Windows_NT' ">$(TestTargetFrameworks);net472</SamplesFrameworks>
</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>13</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>
<PropertyGroup>
<PackageReadmeFile>README.md</PackageReadmeFile>
</PropertyGroup>
<ItemGroup>
<None Include="..\..\README.md" Pack="true" PackagePath="\"/>
</ItemGroup>
</Project>