forked from dotnet/Open-XML-SDK
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Directory.Build.props
166 lines (156 loc) · 7.83 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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
<?xml version="1.0" encoding="utf-8"?>
<Project>
<PropertyGroup>
<IsShipped>false</IsShipped>
<SystemIOPackagingVersion>4.7.0</SystemIOPackagingVersion>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<!-- Because of the size of the project, to facilitate quick development, by default only single
frameworks will be build. This is customizable with the following possible values:
- net35: .NET Framework 3.5
- net40: .NET Framework 4.0
- net46: .NET Framework 4.6
- netstandard1_3: .NET Core 2.1 (but running .NET Standard 1.3 build)
- netcoreapp2_1: .NET Core 2.1
- netcoreapp3_1: .NET Core 3.1
- net5_0: .NET 5.0
- All: Will build for all platforms
-->
<ProjectLoadStyle Condition=" '$(ProjectLoadStyle)' == '' ">net5_0</ProjectLoadStyle>
<__InvalidProjectLoadStyle>false</__InvalidProjectLoadStyle>
</PropertyGroup>
<PropertyGroup>
<InformationalVersion>$(GitVersion_InformationalVersion)</InformationalVersion>
<FileVersion>$(GitVersion_MajorMinorPatch)</FileVersion>
<AssemblyVersion>$(GitVersion_AssemblySemVer)</AssemblyVersion>
<Version>$(GitVersion_NuGetVersionV2)</Version>
</PropertyGroup>
<Choose>
<When Condition=" '$(ProjectLoadStyle)' == 'net35' ">
<PropertyGroup>
<ProductTargetFrameworks>net35</ProductTargetFrameworks>
<TestTargetFrameworks>net452</TestTargetFrameworks>
<AssetsTargetFrameworks>net452</AssetsTargetFrameworks>
<!-- BenchmarkDotNet only supports .NET Standard 2.0-->
<BenchmarkTargetFramework>net461</BenchmarkTargetFramework>
<SamplesFrameworks>net46</SamplesFrameworks>
</PropertyGroup>
<ItemGroup>
<Reference Include="WindowsBase" Version="3.0.0.0" />
</ItemGroup>
</When>
<When Condition=" '$(ProjectLoadStyle)' == 'net40' ">
<PropertyGroup>
<ProductTargetFrameworks>net40</ProductTargetFrameworks>
<TestTargetFrameworks>net452</TestTargetFrameworks>
<AssetsTargetFrameworks>net452</AssetsTargetFrameworks>
<!-- BenchmarkDotNet only supports .NET Standard 2.0-->
<BenchmarkTargetFramework>net461</BenchmarkTargetFramework>
<SamplesFrameworks>net46</SamplesFrameworks>
</PropertyGroup>
<ItemGroup>
<Reference Include="WindowsBase" Version="4.0.0.0" />
</ItemGroup>
</When>
<When Condition=" '$(ProjectLoadStyle)' == 'net46' ">
<PropertyGroup>
<ProductTargetFrameworks>net46</ProductTargetFrameworks>
<TestTargetFrameworks>net46</TestTargetFrameworks>
<AssetsTargetFrameworks>net452</AssetsTargetFrameworks>
<BenchmarkTargetFramework>net461</BenchmarkTargetFramework>
<SamplesFrameworks>net46</SamplesFrameworks>
</PropertyGroup>
<ItemGroup>
<Reference Include="WindowsBase" />
</ItemGroup>
</When>
<When Condition=" '$(ProjectLoadStyle)' == 'netstandard1_3' ">
<PropertyGroup>
<ProductTargetFrameworks>netstandard1.3</ProductTargetFrameworks>
<TestTargetFrameworks>netcoreapp2.1</TestTargetFrameworks>
<AssetsTargetFrameworks>netstandard1.3</AssetsTargetFrameworks>
<!-- BenchmarkDotNet only supports .NET Standard 2.0-->
<BenchmarkTargetFramework>netcoreapp2.1</BenchmarkTargetFramework>
<SamplesFrameworks>netcoreapp2.1</SamplesFrameworks>
<!-- Used to special case some tests for running netstandard1.3 build on .NET Core 2.1 -->
<DefineConstants>$(DefineConstants);NETSTANDARD1_3_SDK</DefineConstants>
</PropertyGroup>
</When>
<When Condition=" '$(ProjectLoadStyle)' == 'netcoreapp2_1' ">
<PropertyGroup>
<ProductTargetFrameworks>netstandard2.0</ProductTargetFrameworks>
<TestTargetFrameworks>netcoreapp2.1</TestTargetFrameworks>
<AssetsTargetFrameworks>netstandard1.3</AssetsTargetFrameworks>
<BenchmarkTargetFramework>netcoreapp2.1</BenchmarkTargetFramework>
<SamplesFrameworks>netcoreapp2.1</SamplesFrameworks>
</PropertyGroup>
</When>
<When Condition=" '$(ProjectLoadStyle)' == 'netcoreapp3_1' ">
<PropertyGroup>
<ProductTargetFrameworks>netstandard2.0</ProductTargetFrameworks>
<TestTargetFrameworks>netcoreapp3.1</TestTargetFrameworks>
<AssetsTargetFrameworks>netstandard1.3</AssetsTargetFrameworks>
<BenchmarkTargetFramework>netcoreapp3.1</BenchmarkTargetFramework>
<SamplesFrameworks>netcoreapp3.1</SamplesFrameworks>
</PropertyGroup>
</When>
<When Condition=" '$(ProjectLoadStyle)' == 'net5_0' ">
<PropertyGroup>
<ProductTargetFrameworks>net5.0</ProductTargetFrameworks>
<TestTargetFrameworks>net5.0</TestTargetFrameworks>
<AssetsTargetFrameworks>netstandard1.3</AssetsTargetFrameworks>
<BenchmarkTargetFramework>net5.0</BenchmarkTargetFramework>
<SamplesFrameworks>net5.0</SamplesFrameworks>
</PropertyGroup>
</When>
<When Condition=" '$(ProjectLoadStyle)' == 'All' ">
<PropertyGroup>
<!--
.NET Standard target must be first to avoid a ResXFileCodeGenerator issue
(tracked at https://github.com/dotnet/project-system/issues/1519)
-->
<ProductTargetFrameworks>netstandard1.3;netstandard2.0;net35;net40;net46</ProductTargetFrameworks>
<AssetsTargetFrameworks>net452;netstandard1.3</AssetsTargetFrameworks>
<TestTargetFrameworks>net452;net46;netcoreapp2.1;netcoreapp3.1;net5.0</TestTargetFrameworks>
<BenchmarkTargetFramework>net5.0</BenchmarkTargetFramework>
<SamplesFrameworks>net46;netcoreapp2.1;netcoreapp3.1;net5.0</SamplesFrameworks>
</PropertyGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net35' OR '$(TargetFramework)' == 'net40' OR '$(TargetFramework)'=='net452' OR '$(TargetFramework)' == 'net46' ">
<Reference Include="WindowsBase" />
</ItemGroup>
</When>
<Otherwise>
<PropertyGroup>
<ProductTargetFrameworks>netstandard2.0</ProductTargetFrameworks>
<TestTargetFrameworks>netcoreapp3.1</TestTargetFrameworks>
<AssetsTargetFrameworks>netstandard1.3</AssetsTargetFrameworks>
<BenchmarkTargetFramework>netcoreapp3.1</BenchmarkTargetFramework>
<SamplesFrameworks>netcoreapp3.1</SamplesFrameworks>
<__InvalidProjectLoadStyle>true</__InvalidProjectLoadStyle>
</PropertyGroup>
</Otherwise>
</Choose>
<Target Name="UnknownProjectLoadStyle" BeforeTargets="Build" Condition="$(__InvalidProjectLoadStyle)">
<Warning Text="Unknown ProjectLoadStyle '$(ProjectLoadStyle)' set. Please verify settings in Directory.Build.props and environment variables to a known value. For now, default values will be used." />
</Target>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<PropertyGroup>
<LangVersion>9.0</LangVersion>
<CodeAnalysisRuleSet>$(MSBuildThisFileDirectory)\rules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)DocumentFormat.OpenXml.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<PropertyGroup>
<OutputFullPath>$(MSBuildThisFileDirectory)</OutputFullPath>
<OutputDrop Condition=" '$(OutputDrop)' == '' ">$(OutputFullPath)bin\$(Configuration)\</OutputDrop>
<OutputPath>$(OutputDrop)\$(MSBuildProjectName)\</OutputPath>
<BaseIntermediateOutputPath>$(OutputFullPath)obj\$(MSBuildProjectName)\</BaseIntermediateOutputPath>
</PropertyGroup>
<PropertyGroup>
<IsTestProject Condition=" '$(IsTestProject)' == '' ">false</IsTestProject>
<IsBenchmarkProject Condition=" '$(IsBenchmarkProject)' == '' ">false</IsBenchmarkProject>
</PropertyGroup>
</Project>