forked from dotnet/standard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDirectory.Build.props
212 lines (179 loc) · 11.9 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
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<!--
For non-SDK projects that import this file and then import Microsoft.Common.props,
tell Microsoft.Common.props not to import Directory.Build.props again
-->
<ImportDirectoryBuildProps>false</ImportDirectoryBuildProps>
<ToolSetCommonDirectory>$(MSBuildThisFileDirectory)artifacts\toolset\Common\</ToolSetCommonDirectory>
</PropertyGroup>
<Import Condition="Exists('..\Directory.Build.props')" Project="..\Directory.Build.props" />
<Import Project="$(MSBuildThisFileDirectory)dependencies.props" />
<!-- Common repo directories -->
<PropertyGroup>
<ProjectDir>$(MSBuildThisFileDirectory)</ProjectDir>
<SourceDir>$(ProjectDir)src\</SourceDir>
<!-- Output directories -->
<BinDir Condition="'$(BinDir)'==''">$(ProjectDir)bin/</BinDir>
<ObjDir Condition="'$(ObjDir)'==''">$(BinDir)obj/</ObjDir>
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'==''">$(ObjDir)</BaseIntermediateOutputPath>
<RootIntermediateOutputPath Condition="'$(RootIntermediateOutputPath)'==''">$(BaseIntermediateOutputPath)</RootIntermediateOutputPath>
<PackageOutputRoot Condition="'$(PackageOutputRoot)'=='' and '$(NonShippingPackage)' == 'true'">$(BinDir)packages_noship/</PackageOutputRoot>
<PackageOutputRoot Condition="'$(PackageOutputRoot)'==''">$(BinDir)packages/</PackageOutputRoot>
<!-- Input Directories -->
<PackagesDir>$(DotNetRestorePackagesPath)</PackagesDir>
<PackagesDir Condition="'$(PackagesDir)'==''">$(ProjectDir)packages/</PackagesDir>
<ToolsDir Condition="'$(ToolsDir)'==''">$(ProjectDir)Tools/</ToolsDir>
<!-- Respect environment variable for the .NET install directory if set; otherwise, use the current default location -->
<DotNetRoot Condition="'$(DotNetRoot)' == ''">$(DOTNET_INSTALL_DIR)</DotNetRoot>
<DotNetRoot Condition="'$(DotNetRoot)' == ''">$(ProjectDir).dotnet\</DotNetRoot>
<DotNetRoot Condition="!HasTrailingSlash('$(DotNetRoot)')">$(DotNetRoot)\</DotNetRoot>
<DotnetCliPath Condition="'$(DotnetCliPath)'==''">$(DotNetRoot)</DotnetCliPath>
<ToolHostCmd Condition="'$(ToolHostCmd)'==''">"$(DotNetRoot)dotnet"</ToolHostCmd>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
</PropertyGroup>
<Import Project="$(ToolSetCommonDirectory)Tools.proj.nuget.g.props" Condition="Exists('$(ToolSetCommonDirectory)Tools.proj.nuget.g.props')" />
<!-- Choose .targets files that come from Arcade rather than from buildtools -->
<!-- TODO: Remove when buildtools dependency removed. -->
<PropertyGroup>
<ExcludePartialFacadesImport>true</ExcludePartialFacadesImport>
<ExcludeApiCompatImport>true</ExcludeApiCompatImport>
<ExcludeSigningImport>true</ExcludeSigningImport>
<ExcludeVersioningImport>true</ExcludeVersioningImport>
<ExcludePackagingImport>true</ExcludePackagingImport>
<ExcludePackageLibsImport>true</ExcludePackageLibsImport>
</PropertyGroup>
<!-- Import Build tools common props file where repo-independent properties are found -->
<Import Project="$(ToolsDir)Build.Common.props" Condition="Exists('$(ToolsDir)Build.Common.props')" />
<!-- Import packaging props -->
<Import Project="$(MSBuildThisFileDirectory)Packaging.props"/>
<!-- list of nuget package sources passed to dotnet -->
<PropertyGroup>
<RestoreSources Condition="'$(DotNetBuildOffline)' != 'true'">
https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json;
https://dotnet.myget.org/F/dotnet-core/api/v3/index.json;
https://api.nuget.org/v3/index.json;
$(RestoreSources)
</RestoreSources>
</PropertyGroup>
<PropertyGroup>
<!-- By default make all libraries to be AnyCPU but individual projects can override it if they need to -->
<Platform>AnyCPU</Platform>
<OutputType>Library</OutputType>
<RunApiCompat>true</RunApiCompat>
<StrongNameKeyId>Open</StrongNameKeyId>
<LangVersion>latest</LangVersion> <!-- default to allowing all language features -->
</PropertyGroup>
<!--
Projects that have no OS-specific implementations just use Debug and Release for $(Configuration).
Projects that do have OS-specific implementations use OS_Debug and OS_Release, for all OS's we support even
if the code is the same between some OS's (so if you have some project that just calls POSIX APIs, we still have
OSX_[Debug|Release] and Linux_[Debug|Release] configurations. We do this so that we place all the output under
a single binary folder and can have a similar experience between the command line and Visual Studio.
-->
<!--
If Configuration is empty that means we are not being built in VS and so folks need to explicitly pass the different
values for $(ConfigurationGroup), $(TargetGroup), or $(OSGroup) or accept the defaults for them.
-->
<PropertyGroup Condition="'$(Configuration)'==''">
<ConfigurationGroup Condition="'$(ConfigurationGroup)'==''">Debug</ConfigurationGroup>
<Configuration>$(ConfigurationGroup)</Configuration>
<Configuration Condition="'$(TargetGroup)'!=''">$(TargetGroup)_$(Configuration)</Configuration>
<Configuration Condition="'$(OSGroup)'!='' and '$(OSGroup)'!='AnyOS'">$(OSGroup)_$(Configuration)</Configuration>
</PropertyGroup>
<!--
If Configuration is set then someone explicitly passed it in or we building from VS. In either case
default $(ConfigurationGroup), $(TargetGroup), or $(OSGroup) from the Configuration if they aren't
already explicitly set.
-->
<PropertyGroup Condition="'$(Configuration)'!=''">
<ConfigurationGroup Condition="'$(ConfigurationGroup)'=='' and $(Configuration.EndsWith('Debug'))">Debug</ConfigurationGroup>
<ConfigurationGroup Condition="'$(ConfigurationGroup)'=='' and $(Configuration.EndsWith('Release'))">Release</ConfigurationGroup>
<ConfigurationGroup Condition="'$(ConfigurationGroup)'==''">Debug</ConfigurationGroup>
<BuildAllOSGroups Condition="'$(BuildAllOSGroups)' == ''">true</BuildAllOSGroups>
<OSGroup Condition="'$(OSGroup)'=='' and $(Configuration.StartsWith('Windows'))">Windows_NT</OSGroup>
<OSGroup Condition="'$(OSGroup)'=='' and $(Configuration.StartsWith('Unix'))">Unix</OSGroup>
<OSGroup Condition="'$(OSGroup)'=='' and $(Configuration.StartsWith('Linux'))">Linux</OSGroup>
<OSGroup Condition="'$(OSGroup)'=='' and $(Configuration.StartsWith('OSX'))">OSX</OSGroup>
<OSGroup Condition="'$(OSGroup)'=='' and $(Configuration.StartsWith('FreeBSD'))">FreeBSD</OSGroup>
<OSGroup Condition="'$(OSGroup)'=='' and $(Configuration.StartsWith('NetBSD'))">NetBSD</OSGroup>
<OSGroup Condition="'$(OSGroup)'==''">AnyOS</OSGroup>
<TargetGroup Condition="'$(TargetGroup)'=='' and $(Configuration.Contains('netcore50aot'))">netcore50aot</TargetGroup>
<TargetGroup Condition="'$(TargetGroup)'=='' and $(Configuration.Contains('netstandard13aot'))">netstandard13aot</TargetGroup>
<TargetGroup Condition="'$(TargetGroup)'=='' and $(Configuration.Contains('netstandard15aot'))">netstandard15aot</TargetGroup>
<TargetGroup Condition="'$(TargetGroup)'=='' and $(Configuration.Contains('netcore50'))">netcore50</TargetGroup>
<TargetGroup Condition="'$(TargetGroup)'=='' and $(Configuration.Contains('netcoreapp1.0'))">netcoreapp1.0</TargetGroup>
<TargetGroup Condition="'$(TargetGroup)'=='' and $(Configuration.Contains('netcoreapp1.1'))">netcoreapp1.1</TargetGroup>
<TargetGroup Condition="'$(TargetGroup)'=='' and $(Configuration.Contains('dnxcore50'))">dnxcore50</TargetGroup>
<TargetGroup Condition="'$(TargetGroup)'=='' and $(Configuration.Contains('net463'))">net463</TargetGroup>
<TargetGroup Condition="'$(TargetGroup)'=='' and $(Configuration.Contains('net462'))">net462</TargetGroup>
<TargetGroup Condition="'$(TargetGroup)'=='' and $(Configuration.Contains('net461'))">net461</TargetGroup>
<TargetGroup Condition="'$(TargetGroup)'=='' and $(Configuration.Contains('net46'))">net46</TargetGroup>
<TargetGroup Condition="'$(TargetGroup)'=='' and $(Configuration.Contains('net45'))">net45</TargetGroup>
<TargetGroup Condition="'$(TargetGroup)'=='' and $(Configuration.Contains('net451'))">net451</TargetGroup>
<TargetGroup Condition="'$(TargetGroup)'=='' and $(Configuration.Contains('win8'))">win8</TargetGroup>
<TargetGroup Condition="'$(TargetGroup)'=='' and $(Configuration.Contains('wpa81'))">wpa81</TargetGroup>
<TargetGroup Condition="'$(TargetGroup)'=='' and $(Configuration.Contains('uap101aot'))">uap101aot</TargetGroup>
<TargetGroup Condition="'$(TargetGroup)'=='' and $(Configuration.Contains('uap101'))">uap101</TargetGroup>
</PropertyGroup>
<PropertyGroup>
<ImportNetSdkFromRepoToolset>false</ImportNetSdkFromRepoToolset>
</PropertyGroup>
<Import Project="Sdk.props" Sdk="Microsoft.DotNet.Arcade.Sdk" />
<!-- Set up Default symbol and optimization for Configuration -->
<Choose>
<When Condition="'$(ConfigurationGroup)'=='Debug'">
<PropertyGroup>
<DebugSymbols Condition="'$(DebugSymbols)' == ''">true</DebugSymbols>
<Optimize Condition="'$(Optimize)' == ''">false</Optimize>
<DebugType>full</DebugType>
<DefineConstants>$(DefineConstants),DEBUG,TRACE</DefineConstants>
</PropertyGroup>
</When>
<When Condition="'$(ConfigurationGroup)' == 'Release'">
<PropertyGroup>
<DebugSymbols Condition="'$(DebugSymbols)' == ''">true</DebugSymbols>
<Optimize Condition="'$(Optimize)' == ''">true</Optimize>
<DebugType>pdbonly</DebugType>
<DefineConstants>$(DefineConstants),TRACE</DefineConstants>
</PropertyGroup>
</When>
<Otherwise>
<PropertyGroup>
<ConfigurationErrorMsg>$(ConfigurationErrorMsg);Unknown ConfigurationGroup [$(ConfigurationGroup)] specificed in your project.</ConfigurationErrorMsg>
</PropertyGroup>
</Otherwise>
</Choose>
<!-- Disable some standard properties for building our projects -->
<PropertyGroup>
<NoStdLib>true</NoStdLib>
<NoExplicitReferenceToStdLib>true</NoExplicitReferenceToStdLib>
<AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>
<GenerateTargetFrameworkAttribute>false</GenerateTargetFrameworkAttribute>
</PropertyGroup>
<!-- Set up handling of build warnings -->
<PropertyGroup>
<WarningLevel>4</WarningLevel>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<!-- Set up the default output and intermediate paths -->
<PropertyGroup>
<OSPlatformConfig>$(OSGroup).$(Platform).$(ConfigurationGroup)</OSPlatformConfig>
<TargetOutputRelPath Condition="'$(TargetGroup)'!=''">$(TargetGroup)/</TargetOutputRelPath>
<BaseOutputPath>$(BinDir)</BaseOutputPath>
<OutputPathSubfolder Condition="'$(IsCompatAssembly)'=='true'">/Compat</OutputPathSubfolder>
<OutputPath>$(BaseOutputPath)$(OSPlatformConfig)/$(MSBuildProjectName)/$(TargetOutputRelPath)$(OutputPathSubfolder)</OutputPath>
<IntermediateOutputRootPath>$(BaseIntermediateOutputPath)$(OSPlatformConfig)/</IntermediateOutputRootPath>
<IntermediateOutputPath>$(IntermediateOutputRootPath)$(MSBuildProjectName)/$(TargetOutputRelPath)</IntermediateOutputPath>
<TestPath Condition="'$(TestPath)'==''">$(TestWorkingDir)$(OSPlatformConfig)/$(MSBuildProjectName)/</TestPath>
</PropertyGroup>
<!-- Target Framework Moniker values to be used in our projects -->
<PropertyGroup>
<UapRs3Tfm>uap10.0.15138</UapRs3Tfm>
</PropertyGroup>
<!-- Use Roslyn Compilers to build -->
<Import Project="$(RoslynPropsFile)" Condition="'$(RunningOnUnix)'!='true' and Exists('$(RoslynPropsFile)') and '$(UseRoslynCompilers)'!='false' and '$(RoslynIncompatibleMsbuildVersion)' != 'true'" />
<Import Project="$(RoslynPropsFile)" Condition="'$(RunningOnUnix)'=='true' and Exists('$(RoslynPropsFile)') and '$(RoslynIncompatibleMsbuildVersion)' != 'true'"/>
</Project>