-
Notifications
You must be signed in to change notification settings - Fork 133
/
Copy pathDirectory.Build.props
268 lines (236 loc) · 18.5 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
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
<Project>
<PropertyGroup>
<ImportNetSdkFromRepoToolset>false</ImportNetSdkFromRepoToolset>
<_SuppressSdkImports>true</_SuppressSdkImports>
<Configuration Condition="$(Configuration) == ''">Release</Configuration>
</PropertyGroup>
<Import Condition="'$(SkipArcadeSdkImport)' != 'true'" Project="Sdk.props" Sdk="Microsoft.DotNet.Arcade.Sdk" />
<PropertyGroup>
<!-- Fake, for SDK. -->
<TargetFramework>netstandard2.0</TargetFramework>
<!-- We have no projects targeting multiple frameworks, so don't include in output path. -->
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
</PropertyGroup>
<PropertyGroup>
<Platform Condition="'$(Platform)' == 'AnyCPU'"></Platform>
<BuildArchitecture>$([System.Runtime.InteropServices.RuntimeInformation]::ProcessArchitecture.ToString().ToLowerInvariant())</BuildArchitecture>
<Platform Condition="'$(Platform)' == '' AND '$(BuildArchitecture)' == 'arm64'">$(BuildArchitecture)</Platform>
<Platform Condition="'$(Platform)' == ''">x64</Platform>
<UseStableVersions Condition="'$(UseStableVersions)' == ''">true</UseStableVersions>
<!-- new supported portable/nonportable options. These control whether to build portable runtime
or portable SDK. The PortableBuild flag is only set in runtime-portable.proj and should
no longer be passed in. -->
<BuildPortableRuntime Condition="'$(BuildPortableRuntime)' == ''">false</BuildPortableRuntime>
<BuildPortableSdk Condition="'$(BuildPortableSdk)' == ''">false</BuildPortableSdk>
</PropertyGroup>
<!-- This repo's projects are entirely infrastructure and do not ship. -->
<PropertyGroup>
<IsShipping>false</IsShipping>
</PropertyGroup>
<PropertyGroup>
<ProjectDir>$(MSBuildThisFileDirectory)</ProjectDir>
<TargetsDir>$(ProjectDir)targets/</TargetsDir>
<KeysDir>$(ProjectDir)keys/</KeysDir>
<DotNetCliToolDir Condition="'$(DotNetCliToolDir)' == '' and '$(CustomDotNetSdkDir)' != ''">$([MSBuild]::EnsureTrailingSlash('$(CustomDotNetSdkDir)'))</DotNetCliToolDir>
<DotNetCliToolDir Condition="'$(DotNetCliToolDir)' == '' and '$(DOTNET_INSTALL_DIR)' != ''">$([MSBuild]::NormalizeDirectory('$(DOTNET_INSTALL_DIR)'))</DotNetCliToolDir>
<DotNetCliToolDir Condition="'$(DotNetCliToolDir)' == ''">$(ProjectDir).dotnet/</DotNetCliToolDir>
<DotnetToolCommand>$(DotNetCliToolDir)dotnet</DotnetToolCommand>
<PatchesDir>$(ProjectDir)patches/</PatchesDir>
<PackagesDir Condition="'$(NuGetPackageRoot)' != ''">$(NuGetPackageRoot)</PackagesDir>
<PackagesDir Condition="'$(PackagesDir)' == ''">$(ProjectDir)packages/restored/</PackagesDir>
<ArcadeBootstrapPackageDir>$(PackagesDir)ArcadeBootstrapPackage/</ArcadeBootstrapPackageDir>
<!-- if we're not currently building, Visual Studio will still set this -->
<SDK_VERSION Condition="'$(SDK_VERSION)' == ''">$(NETCoreSdkVersion)</SDK_VERSION>
<DotNetSdkDir>$(DotNetCliToolDir)sdk/$(SDK_VERSION)/</DotNetSdkDir>
<DotNetSdkResolversDir>$(DotNetSdkDir)SdkResolvers/</DotNetSdkResolversDir>
<SdkReferenceDir>$(DotNetCliToolDir)sdk/$(SDK_VERSION)/</SdkReferenceDir>
</PropertyGroup>
<!--
'.proj' has no DefaultLanguageSourceExtension, causing **/* to be collected
in Compile items! Avoid this by disabling the default items.
-->
<PropertyGroup Condition="'$(MSBuildProjectExtension)' == '.proj'">
<EnableDefaultItems>false</EnableDefaultItems>
</PropertyGroup>
<PropertyGroup>
<LogVerbosity Condition="'$(LogVerbosity)'==''">minimal</LogVerbosity>
</PropertyGroup>
<PropertyGroup>
<BuildInParallel Condition="'$(BuildInParallel)'==''">false</BuildInParallel>
</PropertyGroup>
<PropertyGroup>
<ShellExtension Condition="'$(OS)' == 'Windows_NT'">.cmd</ShellExtension>
<ShellExtension Condition="'$(OS)' != 'Windows_NT'">.sh</ShellExtension>
<TarBallExtension Condition="'$(OS)' == 'Windows_NT'">.zip</TarBallExtension>
<TarBallExtension Condition="'$(OS)' != 'Windows_NT'">.tar.gz</TarBallExtension>
</PropertyGroup>
<PropertyGroup>
<SubmoduleDirectory Condition="'$(SubmoduleDirectory)' == ''">$(ProjectDir)src/</SubmoduleDirectory>
<GitModulesPath>$(ProjectDir).gitmodules</GitModulesPath>
<ProdConFeedPath>$(ProjectDir)ProdConFeed.txt</ProdConFeedPath>
</PropertyGroup>
<PropertyGroup>
<!-- Init basic Arcade props, if the project importing this file doesn't use Arcade. -->
<ArtifactsDir Condition="'$(ArtifactsDir)' == ''">$(ProjectDir)artifacts/</ArtifactsDir>
<RepositoryEngineeringDir Condition="'$(RepositoryEngineeringDir)' == ''">$(ProjectDir)eng/</RepositoryEngineeringDir>
</PropertyGroup>
<PropertyGroup>
<BaseOutputPath>$(ArtifactsDir)</BaseOutputPath>
<ClonedSubmoduleDirectory Condition="'$(ClonedSubmoduleDirectory)' == ''">$(BaseOutputPath)src/</ClonedSubmoduleDirectory>
<ClonedSubmoduleGitRootDirectory Condition="'$(ClonedSubmoduleGitRootDirectory)' == ''">$(ProjectDir).git/modules/src/</ClonedSubmoduleGitRootDirectory>
<ToolsDir>$(ProjectDir)Tools/</ToolsDir>
<ToolPackageExtractDir>$(ToolsDir)source-built/</ToolPackageExtractDir>
<ToolsLocalDir>$(ProjectDir)tools-local/</ToolsLocalDir>
<TaskDirectory>$(ToolsLocalDir)tasks/</TaskDirectory>
<DarcInstallDir>$(DotNetCliToolDir)tools/</DarcInstallDir>
<DarcVersion>$([System.IO.File]::ReadAllText('$(ProjectDir)DarcVersion.txt').Trim())</DarcVersion>
<DarcDll>$(DotNetCliToolDir)tools/.store/microsoft.dotnet.darc/$(DarcVersion)/microsoft.dotnet.darc/$(DarcVersion)/tools/netcoreapp3.0/any/Microsoft.DotNet.Darc.dll</DarcDll>
<XPlatTasksBinDir>$(TaskDirectory)Microsoft.DotNet.SourceBuild.Tasks.XPlat/bin/$(Configuration)/</XPlatTasksBinDir>
<XPlatSourceBuildTasksAssembly>$(XPlatTasksBinDir)Microsoft.DotNet.SourceBuild.Tasks.XPlat.dll</XPlatSourceBuildTasksAssembly>
<LeakDetectionTasksBinDir>$(TaskDirectory)Microsoft.DotNet.SourceBuild.Tasks.LeakDetection/</LeakDetectionTasksBinDir>
<LeakDetectionTasksAssembly>$(LeakDetectionTasksBinDir)Microsoft.DotNet.SourceBuild.Tasks.LeakDetection.dll</LeakDetectionTasksAssembly>
<BaseIntermediatePath>$(BaseOutputPath)obj/</BaseIntermediatePath>
<OutputPath>$(BaseOutputPath)$(Platform)/$(Configuration)/</OutputPath>
<IntermediatePath>$(BaseIntermediatePath)$(Platform)/$(Configuration)/</IntermediatePath>
<LocalBlobStorageRoot>$(IntermediatePath)blobs/</LocalBlobStorageRoot>
<LocalNuGetPackagesRoot>$(IntermediatePath)nuget-packages/</LocalNuGetPackagesRoot>
<SourceBuiltBlobFeedDir>$(IntermediatePath)blob-feed/</SourceBuiltBlobFeedDir>
<SourceBuiltPackagesPath>$(SourceBuiltBlobFeedDir)packages/</SourceBuiltPackagesPath>
<SourceBuiltAssetsDir>$(SourceBuiltBlobFeedDir)assets/</SourceBuiltAssetsDir>
<PrebuiltPackagesPath>$(ProjectDir)packages/prebuilt/</PrebuiltPackagesPath>
<PreviouslyRestoredPackagesPath>$(ProjectDir)packages/previouslyRestored/</PreviouslyRestoredPackagesPath>
<PrebuiltSourceBuiltPackagesPath>$(ProjectDir)packages/source-built/</PrebuiltSourceBuiltPackagesPath>
<PrebuiltSourceBuiltPackagesPath Condition="'$(CustomPrebuiltSourceBuiltPackagesPath)' != ''">$(CustomPrebuiltSourceBuiltPackagesPath)/</PrebuiltSourceBuiltPackagesPath>
<SourceBuiltTarBallPath>$(OutputPath)</SourceBuiltTarBallPath>
<SourceBuiltToolsetDir>$(LocalBlobStorageRoot)Sdk/</SourceBuiltToolsetDir>
<SourceBuiltRuntimeDir>$(LocalBlobStorageRoot)Runtime/</SourceBuiltRuntimeDir>
<SourceBuiltAspNetCoreRuntime>$(LocalBlobStorageRoot)aspnetcore/Runtime/</SourceBuiltAspNetCoreRuntime>
<RestoreSourcePropsPath>$(IntermediatePath)RestoreSources.props</RestoreSourcePropsPath>
<PackageVersionPropsPath>$(IntermediatePath)PackageVersions.props</PackageVersionPropsPath>
<GennedPackageVersionPropsPath Condition="'$(OfflineBuild)' == 'true'">$(IntermediatePath)GennedPackageVersions.props</GennedPackageVersionPropsPath>
<GennedPackageVersionPropsPath Condition="'$(OfflineBuild)' != 'true'">$(IntermediatePath)PackageVersions.props</GennedPackageVersionPropsPath>
<LoggingDir>$(BaseOutputPath)logs/</LoggingDir>
<MSBuildDebugPathTargetDir>$(BaseOutputPath)msbuild-debug/</MSBuildDebugPathTargetDir>
<RoslynDebugPathTargetDir>$(BaseOutputPath)roslyn-debug/</RoslynDebugPathTargetDir>
<AspNetRazorBuildServerLogDir>$(BaseOutputPath)aspnet-debug</AspNetRazorBuildServerLogDir>
<AspNetRazorBuildServerLogFile>$(AspNetRazorBuildServerLogDir)razor-build-server.log</AspNetRazorBuildServerLogFile>
<!-- Dir where git info is generated during online builds. -->
<GitInfoOutputDir>$(BaseOutputPath)git-info/</GitInfoOutputDir>
<!-- Dir where git info is placed inside the tarball. -->
<GitInfoOfflineDir>$(ProjectDir)git-info/</GitInfoOfflineDir>
<OutputGitInfoPropsFile>$(GitInfoOutputDir)$(RepositoryName).props</OutputGitInfoPropsFile>
<ProductionAllRepoPropsFile>$(GitInfoOutputDir)AllRepoVersions.props</ProductionAllRepoPropsFile>
<OfflineGitInfoPropsFile>$(GitInfoOfflineDir)$(RepositoryName).props</OfflineGitInfoPropsFile>
<OfflineAllRepoPropsFile>$(GitInfoOfflineDir)AllRepoVersions.props</OfflineAllRepoPropsFile>
<PackageReportDir>$(BaseOutputPath)prebuilt-report/</PackageReportDir>
<PackageReportDataFile>$(PackageReportDir)prebuilt-usage.xml</PackageReportDataFile>
<PoisonUsageReportFile>$(PackageReportDir)poison-usage.xml</PoisonUsageReportFile>
<PoisonReportDataFile>$(PackageReportDir)poison-catalog.xml</PoisonReportDataFile>
<PoisonMarkerFile>.prebuilt.xml</PoisonMarkerFile>
<SourceBuiltPoisonReportDataFile>$(PackageReportDir)poison-source-built-catalog.xml</SourceBuiltPoisonReportDataFile>
<SourceBuiltPoisonMarkerFile>.source-built.xml</SourceBuiltPoisonMarkerFile>
<ProjectAssetsJsonArchiveFile>$(PackageReportDir)all-project-assets-json-files.zip</ProjectAssetsJsonArchiveFile>
<ProdConManifestFile>$(PackageReportDir)prodcon-build.xml</ProdConManifestFile>
<PoisonedReportFile>$(PackageReportDir)poisoned.txt</PoisonedReportFile>
<ConflictingPackageReportDir>$(BaseOutputPath)conflict-report/</ConflictingPackageReportDir>
<OfflinePrebuiltBurndownDataFile>$(PackageReportDir)PrebuiltBurndownData-offline.csv</OfflinePrebuiltBurndownDataFile>
<OnlinePrebuiltBurndownDataFile>$(PackageReportDir)PrebuiltBurndownData-online.csv</OnlinePrebuiltBurndownDataFile>
<ReferencePackagesBaseDir>$(IntermediatePath)reference-packages/</ReferencePackagesBaseDir>
<ExternalTarballsDir>$(IntermediatePath)external-tarballs/</ExternalTarballsDir>
<!--
Change ReferencePackagesBaseDir & ExternalTarballsDir conditionally in offline build.
See corresponding change in build-source-tarball.sh to copy reference-packages & external-tarballs
from source-build bin dir to tarball packages/reference dir & packages/archive.
-->
<ExternalTarballsDir Condition="'$(OfflineBuild)' == 'true'">$(ProjectDir)packages/archive/</ExternalTarballsDir>
<ReferencePackagesBaseDir Condition="'$(OfflineBuild)' == 'true'">$(ProjectDir)packages/reference/</ReferencePackagesBaseDir>
<ReferencePackagesDir>$(ReferencePackagesBaseDir)packages/</ReferencePackagesDir>
<ReferencePackagesDir Condition="'$(CustomReferencePackagesPath)' != ''">$(CustomReferencePackagesPath)/</ReferencePackagesDir>
<SourceBuiltArtifactsTarballName>Private.SourceBuilt.Artifacts</SourceBuiltArtifactsTarballName>
<SourceBuiltArtifactsTarballUrl>https://dotnetcli.azureedge.net/source-built-artifacts/assets/</SourceBuiltArtifactsTarballUrl>
<ReferencePackagesTarballName>Private.SourceBuild.ReferencePackages</ReferencePackagesTarballName>
<ReferencePackagesTarballUrl>https://dotnetfeed.blob.core.windows.net/dotnet-core/assets/</ReferencePackagesTarballUrl>
<BaselineDataFile>$(ToolsLocalDir)prebuilt-baseline-</BaselineDataFile>
<OfflineBaselineDataFile>$(BaselineDataFile)offline.xml</OfflineBaselineDataFile>
<OnlineBaselineDataFile>$(BaselineDataFile)online.xml</OnlineBaselineDataFile>
<BaselineDataFile Condition="'$(OfflineBuild)' == 'true'">$(OfflineBaselineDataFile)</BaselineDataFile>
<BaselineDataFile Condition="'$(OfflineBuild)' != 'true'">$(OnlineBaselineDataFile)</BaselineDataFile>
<!--Exclude tests that are failing for test enabled projects like - corefx -->
<TestExclusionsDir>$(ProjectDir)test/exclusions/</TestExclusionsDir>
</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')" />
<PropertyGroup>
<ArmEnvironmentVariables Condition="'$(ArmEnvironmentVariables)' == ''">ROOTFS_DIR=$(BaseIntermediatePath)crossrootfs/arm</ArmEnvironmentVariables>
<ArmEnvironmentVariables Condition="'$(Platform)' == 'armel'">ROOTFS_DIR=$(BaseIntermediatePath)crossrootfs/armel</ArmEnvironmentVariables>
</PropertyGroup>
<PropertyGroup>
<TargetRid Condition="'$(TargetRid)' == ''">$([System.Runtime.InteropServices.RuntimeInformation]::RuntimeIdentifier)</TargetRid>
<TargetOS Condition="'$(TargetOS)' == '' AND $([MSBuild]::IsOSPlatform('WINDOWS'))">Windows_NT</TargetOS>
<TargetOS Condition="'$(TargetOS)' == '' AND $([MSBuild]::IsOSPlatform('OSX'))">OSX</TargetOS>
<TargetOS Condition="'$(TargetOS)' == '' AND $([MSBuild]::IsOSPlatform('LINUX'))">Linux</TargetOS>
<TargetOS Condition="'$(TargetOS)' == '' AND $([MSBuild]::IsOSPlatform('FREEBSD'))">FreeBSD</TargetOS>
</PropertyGroup>
<PropertyGroup Condition="'$(PortableBuild)' == 'true'">
<TargetRid Condition="'$(TargetOS)' == 'FreeBSD'">freebsd-$(Platform)</TargetRid>
<TargetRid Condition="'$(TargetOS)' == 'OSX'">osx-$(Platform)</TargetRid>
<TargetRid Condition="'$(TargetOS)' == 'Linux'">linux-$(Platform)</TargetRid>
<TargetRid Condition="'$(TargetOS)' == 'Windows_NT'">win-$(Platform)</TargetRid>
</PropertyGroup>
<PropertyGroup>
<!-- known-good (repos/known-good.proj) conditionally includes submodules based on the platform,
so this will not always correspond to the same repos - see that file for details.
We need an "empty" project after the last real project in order for prebuilt detection
to work, so we always build known-good. -->
<RootRepo>known-good</RootRepo>
<RootRepoTests>known-good-tests</RootRepoTests>
</PropertyGroup>
<!--
Semaphore path for incremental builds
-->
<PropertyGroup>
<CompletedSemaphorePath>$(BaseIntermediatePath)semaphores/</CompletedSemaphorePath>
</PropertyGroup>
<!-- CLI internal version is statically set by us to a version that will never show up in the wild.
This ensures we will never restore a public version instead of our source-built version. We
invlude the version number because it is used both by CLI.proj and the core-sdk build and they
have to be synced up. ExtraPackageVersionPropsPackageInfo doesn't work in cli.proj because
toolset is between CLI and core-sdk, and the extra package version info is lost. -->
<PropertyGroup>
<CliInternalReleaseTag>source</CliInternalReleaseTag>
<CliInternalBuildVersion>30000001-1</CliInternalBuildVersion>
</PropertyGroup>
<ItemGroup>
<ExtraPackageVersionPropsPackageInfo Include="DotnetCliInternalVersion" Version="3.0.100-$(CliInternalReleaseTag)-$(CliInternalBuildVersion)" />
</ItemGroup>
<Import Project="$(ProductionAllRepoPropsFile)" Condition="Exists('$(ProductionAllRepoPropsFile)')" />
<Import Project="$(OfflineAllRepoPropsFile)" Condition="Exists('$(OfflineAllRepoPropsFile)')" />
<!-- Additional psuedo-versions that some repos depend on -->
<ItemGroup>
<!-- we don't produce the Windows version of this package but that's the one core-sdk keys off of for the ASP.NET version -->
<ExtraPackageVersionPropsPackageInfo Include="MicrosoftAspNetCoreAppRuntimewinx64PackageVersion" Version="$(aspnetcoreOutputPackageVersion)" />
<!-- same thing here for CLI -->
<ExtraPackageVersionPropsPackageInfo Include="MicrosoftNETCoreAppRuntimewinx64Version" Version="$(coresetupOutputPackageVersion)" />
<!-- same thing here for toolset -->
<ExtraPackageVersionPropsPackageInfo Include="MicrosoftNETCoreAppRuntimewinx64PackageVersion" Version="%24(MicrosoftNETCoreDotNetAppHostPackageVersion)" />
<!-- same thing here for core-sdk -->
<ExtraPackageVersionPropsPackageInfo Include="MicrosoftNETCoreAppRuntimePackageVersion" Version="%24(MicrosoftNETCoreDotNetAppHostPackageVersion)" />
<ExtraPackageVersionPropsPackageInfo Include="MicrosoftNETCoreAppRuntimeVersion" Version="%24(MicrosoftNETCoreDotNetAppHostPackageVersion)" />
<ExtraPackageVersionPropsPackageInfo Include="MicrosoftNETCoreAppHostPackageVersion" Version="%24(MicrosoftNETCoreDotNetAppHostPackageVersion)" />
<ExtraPackageVersionPropsPackageInfo Include="MicrosoftAspNetCoreAppRuntimePackageVersion" Version="%24(MicrosoftAspNetCoreAppRuntimeLinux$(Platform)PackageVersion)" />
<!-- core-sdk uses this property for ASP.NET blob directory -->
<ExtraPackageVersionPropsPackageInfo Include="VSRedistCommonAspNetCoreTargetingPackx6430PackageVersion" Version="$(aspnetcoreOutputPackageVersion)" />
<!-- OSX needs the OSX version instead of Linux. We don't have a lot of flexibility in how we output these properties so we're relying on the previous one being blank if the Linux version of the package is missing. -->
<ExtraPackageVersionPropsPackageInfo Include="MicrosoftAspNetCoreAppRuntimePackageVersion" Version="%24(MicrosoftAspNetCoreAppRuntimeOsxX64PackageVersion)" DoNotOverwrite="true" />
<ExtraPackageVersionPropsPackageInfo Include="MicrosoftAspNetCoreAppRuntimePackageVersion" Version="%24(MicrosoftAspNetCoreAppRuntimewinx64PackageVersion)" DoNotOverwrite="true" />
<!-- Used by sdk to determine msbuild version for fsharp -->
<ExtraPackageVersionPropsPackageInfo Include="FSharpBuildVersion" Version="%24(MicrosoftBuildPackageVersion)" />
<!-- Used by roslyn-analyzsers to determine rsolyn version -->
<ExtraPackageVersionPropsPackageInfo Include="MicrosoftCodeAnalysisForShippedApisVersion" Version="%24(MicrosoftCodeAnalysisVersion)" />
<ExtraPackageVersionPropsPackageInfo Include="MicrosoftCodeAnalysisForRoslynDiagnosticsAnalyzersVersion" Version="%24(MicrosoftCodeAnalysisVersion)" />
<!-- property used by Arcade to determine what version of SourceLink to use -->
<!-- if MicrosoftSourceLinkCommonPackageVersion is non-empty, then we've already built SourceLink, regardless of whether
this is the production or offline build, so we should use that version. -->
<ExtraPackageVersionPropsPackageInfo Include="MicrosoftSourceLinkVersion" Version="%24(MicrosoftSourceLinkCommonPackageVersion)" />
</ItemGroup>
</Project>