- Notifications
You must be signed in to change notification settings - Fork 10.3k
/
Copy pathBuild.props
292 lines (265 loc) · 18.7 KB
/
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
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
<Project>
<ImportProject="Common.props" />
<!--
@(RequiresDelayedBuild) projects can be extended many ways but this isn't fully automated because the new
projects likely aren't referenced initially. To add new projects, edit RequiresDelayedBuildProjects.props
manually, update the $(BuildMainlyReferenceProviders)' == 'true' item group near the bottom of this file,
or edit BuildAfterTargetingPack.csproj. Then run GenerateProjectList.ps1 (even for the first option to ensure
the format is correct) and undo any temporary changes. When complete, only BuildAfterTargetingPack.csproj and
other @(RequiresDelayedBuild) projects should mention projects listed in RequiresDelayedBuildProjects.props.
-->
<ImportProject="RequiresDelayedBuildProjects.props" />
<!-- These projects are always excluded, even when -projects is specified on command line. -->
<ItemGroup>
<!-- Explicitly excluded projects -->
<ProjectToExcludeInclude="$(ProjectToExclude)" />
<!-- These projects use 'legacy' csproj, which is not supported by dotnet-msbuild. -->
<ProjectToExcludeInclude="
$(RepoRoot)src\Servers\HttpSys\samples\TestClient\TestClient.csproj;
$(RepoRoot)src\Middleware\WebSockets\samples\TestServer\WebSockets.TestServer.csproj;
"
Condition=" '$(MSBuildRuntimeType)' == 'Core' " />
<!-- Exclude the websockets samples for now because they use classic .csproj, which is not yet supported in our build. -->
<ProjectToExcludeInclude="$(RepoRoot)src\Middleware\WebSockets\samples\**\*.csproj" />
<!-- These projects are meant to be referenced only by tests or via BuildAfterTargetingPack.csproj. -->
<ProjectToExclude
Include="$(RepoRoot)src\**\testassets\**\*.*proj;
@(RequiresDelayedBuild);
"
Exclude="$(RepoRoot)src\Components\WebAssembly\testassets\WasmLinkerTest\*.*proj;
$(RepoRoot)src\Components\WebView\Samples\PhotinoPlatform\testassets\PhotinoTestApp\*.*proj;
$(RepoRoot)src\Http\Routing\test\testassets\RoutingSandbox\*.*proj;
$(RepoRoot)src\Security\Authentication\Negotiate\test\testassets\Negotiate.Client\*.*proj;
$(RepoRoot)src\Security\Authentication\Negotiate\test\testassets\Negotiate.Server\*.*proj;
" />
<!-- These projects are not meant to be built in this repo. In the Installers case, must explicitly opt in. -->
<ProjectToExcludeInclude="
$(RepoRoot)src\submodules\googletest\**\*.*proj;
$(RepoRoot)src\submodules\MessagePack-CSharp\**\*.*proj;
$(RepoRoot)src\Components\Web.JS\node_modules\**\*.*proj;
$(RepoRoot)src\Installers\**\*.*proj;
$(RepoRoot)src\ProjectTemplates\Web.ProjectTemplates\content\**\*.*proj;
$(RepoRoot)src\SignalR\clients\ts\**\node_modules\**\*.*proj;
" />
<!-- Exclude the benchmarks because they use <PackageReference>. -->
<ProjectToExcludeInclude="
$(RepoRoot)src\Components\benchmarkapps\BlazingPizza.Server\**\*.csproj;
$(RepoRoot)src\Mvc\perf\**\*.csproj;
$(RepoRoot)src\Servers\Kestrel\perf\PlatformBenchmarks\**\*.csproj;
$(RepoRoot)src\SignalR\perf\benchmarkapps\**\*.csproj;
" />
<!-- In the VMR, we don't build the native ANCM bits in pass 1 -->
<ProjectToExcludeInclude="
$(RepoRoot)src\Installers\**\*.vcxproj;
"
Condition=" '$(BuildNative)' == 'true' and '$(DotNetBuild)' == 'true' and ('$(DotNetBuildPass)' == '' or '$(DotNetBuildPass)' == '1') " />
<!-- This project requires inputs from x64, x86, and arm64 on Windows - therefore in the VMR, we build it in pass 2 -->
<ProjectToExcludeInclude="
$(RepoRoot)src\Servers\IIS/IntegrationTesting.IIS\src\Microsoft.AspNetCore.Server.IntegrationTesting.IIS.csproj;
"
Condition=" '$(TargetOsName)' == 'win' and '$(DotNetBuild)' == 'true' and ('$(DotNetBuildPass)' == '' or '$(DotNetBuildPass)' == '1') " />
</ItemGroup>
<Choose>
<!-- Project selection can be overridden on the command line by passing in -projects. -->
<WhenCondition="'$(ProjectToBuild)' != '' and '$(DotNetBuildPass)' != '2'">
<ItemGroup>
<ProjectToBuildInclude="$(ProjectToBuild)"
Exclude="@(ProjectToExclude);$(RepoRoot)**\bin\**\*;$(RepoRoot)**\obj\**\*">
<BuildInParallelCondition=" '%(Extension)' == '.nodeproj' OR '%(Extension)' == '.vcxproj' ">false</BuildInParallel>
<RestoreInParallelCondition=" '%(Extension)' == '.nodeproj' ">false</RestoreInParallel>
<!-- Also do not build in parallel w/in npm projects. -->
<AdditionalPropertiesCondition=" '%(Extension)' == '.nodeproj' OR '%(Extension)' == '.vcxproj' ">BuildInParallel=false</AdditionalProperties>
</ProjectToBuild>
</ItemGroup>
</When>
<!-- Projects to build in VMR build pass 2 -->
<WhenCondition="'$(DotNetBuildPass)' == '2'">
<ItemGroupCondition=" '$(DotNetBuild)' == 'true' AND '$(TargetOsName)' == 'win' AND '$(TargetArchitecture)' == 'x64' ">
<!-- Build Hosting Bundle -->
<ProjectToBuildInclude="$(RepoRoot)src\Installers\Windows\WindowsHostingBundle\WindowsHostingBundle.wixproj">
<AdditionalProperties>Platform=x86</AdditionalProperties>
<DotNetBuildPass>$(DotNetBuildPass)</DotNetBuildPass>
</ProjectToBuild>
<ProjectToBuildInclude="$(RepoRoot)src\Servers\IIS/IntegrationTesting.IIS\src\Microsoft.AspNetCore.Server.IntegrationTesting.IIS.csproj" >
<DotNetBuildPass>$(DotNetBuildPass)</DotNetBuildPass>
</ProjectToBuild>
<!-- Build SiteExtensions -->
<ProjectToBuildInclude="$(RepoRoot)src\SiteExtensions\LoggingAggregate\src\Microsoft.AspNetCore.AzureAppServices.SiteExtension\Microsoft.AspNetCore.AzureAppServices.SiteExtension.csproj">
<DotNetBuildPass>$(DotNetBuildPass)</DotNetBuildPass>
</ProjectToBuild>
</ItemGroup>
</When>
<Otherwise>
<!-- BuildNative -->
<ItemGroupCondition=" '$(TargetOsName)' == 'win' AND '$(DotNetBuild)' == 'true' ">
<NativeProjectsCondition="'$(TargetArchitecture)' == 'x64'"Include="$(RepoRoot)src\**\*.vcxproj"Exclude="@(ProjectToExclude)"AdditionalProperties="Platform=x64" />
<NativeProjectsCondition="'$(TargetArchitecture)' == 'x86'"Include="$(RepoRoot)src\**\*.vcxproj"Exclude="@(ProjectToExclude)"AdditionalProperties="Platform=Win32" />
<NativeProjectsCondition="'$(TargetArchitecture)' == 'arm64'"Include="$(RepoRoot)src\**\*.vcxproj"Exclude="@(ProjectToExclude)"AdditionalProperties="Platform=arm64" />
</ItemGroup>
<ItemGroupCondition=" '$(TargetOsName)' == 'win' AND '$(DotNetBuild)' != 'true' AND ('$(TargetArchitecture)' == 'x86' OR '$(TargetArchitecture)' == 'x64' OR '$(TargetArchitecture)' == 'arm64') ">
<NativeProjectsInclude="$(RepoRoot)src\**\*.vcxproj"Exclude="@(ProjectToExclude)"AdditionalProperties="Platform=x64" />
<NativeProjectsInclude="$(RepoRoot)src\**\*.vcxproj"Exclude="@(ProjectToExclude)"AdditionalProperties="Platform=Win32" />
<NativeProjectsInclude="$(RepoRoot)src\**\*.vcxproj"Exclude="@(ProjectToExclude)"AdditionalProperties="Platform=arm64" />
</ItemGroup>
<ItemGroup>
<ProjectToBuildCondition=" $(BuildNative) "Include="@(NativeProjects)"Exclude="@(ProjectToExclude)"BuildStep="native" />
<ProjectToExcludeCondition=" !$(BuildNative) "Include="@(NativeProjects)" />
</ItemGroup>
<!-- BuildNode -->
<ItemGroup>
<NodeJsProjects
Include="$(RepoRoot)eng\Npm.Workspace.nodeproj;
$(RepoRoot)eng\Npm.Workspace.FunctionalTests.nodeproj;"
AdditionalProperties="BuildInParallel=false"
BuildInParallel="false"
RestoreInParallel="false"
Exclude="@(ProjectToExclude)" />
<ExplicitRequiresDelayInclude="$(RepoRoot)eng\Npm.Workspace.FunctionalTests.nodeproj" />
<ProjectToBuildCondition=" '$(BuildNodeJS)' == 'true'"Include="@(NodeJsProjects)"Exclude="@(ProjectToExclude)"BuildStep="node" />
<ProjectToExcludeCondition=" '$(BuildNodeJS)' != 'true'"Include="@(NodeJsProjects)" />
</ItemGroup>
<!-- BuildJava -->
<ItemGroup>
<JavaProjectsInclude="$(RepoRoot)src\SignalR\**\*.javaproj"
Exclude="@(ProjectToExclude)" />
<ProjectToBuildCondition=" '$(BuildJava)' == 'true'"Include="@(JavaProjects)"Exclude="@(ProjectToExclude)"BuildStep="managed" />
<ProjectToExcludeCondition=" '$(BuildJava)' != 'true'"Include="@(JavaProjects)" />
</ItemGroup>
<!-- BuildManaged (runs in parallel with BuildJava) -->
<ItemGroup>
<!--
Use caution to avoid deep recursion. If the globbing pattern picks up something which exceeds MAX_PATH,
the entire pattern will silently fail to evaluate correctly.
-->
<DotNetProjectsInclude="
$(RepoRoot)src\Framework\App.Ref\src\Microsoft.AspNetCore.App.Ref.sfxproj;
$(RepoRoot)src\Framework\App.Ref.Internal\src\Microsoft.AspNetCore.App.Ref.Internal.csproj;
$(RepoRoot)src\Framework\App.Runtime\src\aspnetcore-runtime.proj;
$(RepoRoot)src\Framework\App.Runtime\src\aspnetcore-runtime-composite.proj;
$(RepoRoot)src\Framework\App.Runtime\src\aspnetcore-base-runtime.proj;
$(RepoRoot)src\Framework\App.Runtime\bundle\aspnetcore-runtime-bundle.bundleproj;
$(RepoRoot)src\Framework\AspNetCoreAnalyzers\test\Microsoft.AspNetCore.App.Analyzers.Test.csproj;
$(RepoRoot)src\Framework\test\Microsoft.AspNetCore.App.UnitTests.csproj;
$(RepoRoot)src\Assets\**\*.*proj;
$(RepoRoot)src\Caching\**\*.*proj;
$(RepoRoot)src\DefaultBuilder\**\*.*proj;
$(RepoRoot)src\Features\**\*.*proj;
$(RepoRoot)src\DataProtection\**\*.*proj;
$(RepoRoot)src\Antiforgery\**\*.*proj;
$(RepoRoot)src\Hosting\**\*.*proj;
$(RepoRoot)src\Http\**\*.*proj;
$(RepoRoot)src\HttpClientFactory\**\*.*proj;
$(RepoRoot)src\Html.Abstractions\**\*.*proj;
$(RepoRoot)src\Identity\**\*.*proj;
$(RepoRoot)src\Servers\**\*.csproj;
$(RepoRoot)src\Security\**\*.*proj;
$(RepoRoot)src\SiteExtensions\Microsoft.Web.Xdt.Extensions\**\*.csproj;
$(RepoRoot)src\SiteExtensions\LoggingAggregate\test\**\*.csproj;
$(RepoRoot)src\Shared\**\*.*proj;
$(RepoRoot)src\Tools\**\*.*proj;
$(RepoRoot)src\Logging.AzureAppServices\**\src\*.csproj;
$(RepoRoot)src\Middleware\**\*.csproj;
$(RepoRoot)src\Razor\**\*.*proj;
$(RepoRoot)src\Mvc\**\*.*proj;
$(RepoRoot)src\Azure\**\*.*proj;
$(RepoRoot)src\SignalR\**\*.csproj;
$(RepoRoot)src\StaticAssets\**\*.csproj;
$(RepoRoot)src\Components\**\*.csproj;
$(RepoRoot)src\Analyzers\**\*.csproj;
$(RepoRoot)src\FileProviders\**\*.csproj;
$(RepoRoot)src\Configuration.KeyPerFile\**\*.csproj;
$(RepoRoot)src\Localization\**\*.csproj;
$(RepoRoot)src\ObjectPool\**\*.csproj;
$(RepoRoot)src\JSInterop\**\*.csproj;
$(RepoRoot)src\WebEncoders\**\*.csproj;
$(RepoRoot)src\HealthChecks\**\*.csproj;
$(RepoRoot)src\Testing\**\*.csproj;
$(RepoRoot)src\Grpc\**\*.csproj;
$(RepoRoot)src\ProjectTemplates\**\*.csproj;
$(RepoRoot)src\Extensions\**\*.csproj;
$(RepoRoot)src\BuildAfterTargetingPack\*.csproj;
$(RepoRoot)src\OpenApi\**\*.csproj;
$(RepoRoot)eng\tools\HelixTestRunner\HelixTestRunner.csproj;
"
Exclude="
@(ProjectToBuild);
@(ProjectToExclude);
$(RepoRoot)**\node_modules\**\*;
$(RepoRoot)**\bin\**\*;
$(RepoRoot)**\obj\**\*;"
Condition=" '$(BuildMainlyReferenceProviders)' != 'true' " />
<DotNetProjectsInclude="
$(RepoRoot)src\Assets\**\*.*proj;
$(RepoRoot)src\Caching\**\src\*.csproj;
$(RepoRoot)src\DefaultBuilder\**\src\*.csproj;
$(RepoRoot)src\Features\**\src\*.csproj;
$(RepoRoot)src\DataProtection\**\src\*.csproj;
$(RepoRoot)src\Antiforgery\**\src\*.csproj;
$(RepoRoot)src\Hosting\**\src\*.csproj;
$(RepoRoot)src\Http\**\src\*.csproj;
$(RepoRoot)src\HttpClientFactory\**\src\*.csproj;
$(RepoRoot)src\Html.Abstractions\src\*.csproj;
$(RepoRoot)src\Identity\**\src\*.csproj;
$(RepoRoot)src\Servers\**\src\*.csproj;
$(RepoRoot)src\Security\**\src\*.csproj;
$(RepoRoot)src\SiteExtensions\**\src\*.csproj;
$(RepoRoot)src\Tools\**\src\*.csproj;
$(RepoRoot)src\Logging.AzureAppServices\**\src\*.csproj;
$(RepoRoot)src\Middleware\**\src\*.csproj;
$(RepoRoot)src\Razor\**\src\*.csproj;
$(RepoRoot)src\Mvc\**\src\*.csproj;
$(RepoRoot)src\Azure\**\src\*.csproj;
$(RepoRoot)src\SignalR\**\src\*.csproj;
$(RepoRoot)src\StaticAssets\src\*.csproj;
$(RepoRoot)src\Components\**\src\*.csproj;
$(RepoRoot)src\FileProviders\**\src\*.csproj;
$(RepoRoot)src\Configuration.KeyPerFile\**\src\*.csproj;
$(RepoRoot)src\Localization\**\src\*.csproj;
$(RepoRoot)src\ObjectPool\**\src\*.csproj;
$(RepoRoot)src\JSInterop\**\src\*.csproj;
$(RepoRoot)src\WebEncoders\**\src\*.csproj;
$(RepoRoot)src\HealthChecks\**\src\*.csproj;
$(RepoRoot)src\Testing\**\src\*.csproj;
$(RepoRoot)src\Extensions\**\src\*.csproj;
$(RepoRoot)src\BuildAfterTargetingPack\*.csproj;
$(RepoRoot)src\OpenApi\**\src\*.csproj;
"
Exclude="
@(ProjectToBuild);
@(ProjectToExclude);
$(RepoRoot)**\node_modules\**\*;
$(RepoRoot)**\bin\**\*;
$(RepoRoot)**\obj\**\*;"
Condition=" '$(BuildMainlyReferenceProviders)' == 'true' " />
<ProjectToBuildCondition=" '$(BuildManaged)' == 'true'"Include="@(DotNetProjects)"Exclude="@(ProjectToExclude)"BuildStep="managed" />
<ProjectToExcludeCondition=" '$(BuildManaged)' != 'true'"Include="@(DotNetProjects)" />
</ItemGroup>
<!-- BuildInstallers -->
<PropertyGroup>
<_BuildWindowsInstallersCondition="'$(TargetOsName)' == 'win' AND ('$(TargetArchitecture)' == 'x86' OR '$(TargetArchitecture)' == 'x64' OR '$(TargetArchitecture)' == 'arm64') ">true</_BuildWindowsInstallers>
<_VcxTargetPlatformCondition="'$(TargetArchitecture)' == 'x86'">Win32</_VcxTargetPlatform>
<_VcxTargetPlatformCondition="'$(TargetArchitecture)' == 'x64'">x64</_VcxTargetPlatform>
<_VcxTargetPlatformCondition="'$(TargetArchitecture)' == 'arm64'">ARM64</_VcxTargetPlatform>
</PropertyGroup>
<!-- In the VMR, we build the installers entirely via HostingBundle ProjectReferences in pass 2 -->
<ItemGroupCondition="'$(DotNetBuild)' != 'true' and '$(_BuildWindowsInstallers)' == 'true' ">
<!-- Build the ANCM custom action -->
<InstallerProjectInclude="$(RepoRoot)src\Installers\Windows\AspNetCoreModule-Setup\CustomAction\aspnetcoreCA.vcxproj"AdditionalProperties="Platform=x64" />
<InstallerProjectInclude="$(RepoRoot)src\Installers\Windows\AspNetCoreModule-Setup\CustomAction\aspnetcoreCA.vcxproj"AdditionalProperties="Platform=Win32" />
<InstallerProjectInclude="$(RepoRoot)src\Installers\Windows\AspNetCoreModule-Setup\CustomAction\aspnetcoreCA.vcxproj"AdditionalProperties="Platform=ARM64" />
<!-- Build the ANCM msis -->
<InstallerProjectInclude="$(RepoRoot)src\Installers\Windows\AspNetCoreModule-Setup\ANCMIISExpressV2\AncmIISExpressV2.wixproj"AdditionalProperties="Platform=x64" />
<InstallerProjectInclude="$(RepoRoot)src\Installers\Windows\AspNetCoreModule-Setup\ANCMIISExpressV2\AncmIISExpressV2.wixproj"AdditionalProperties="Platform=x86" />
<InstallerProjectInclude="$(RepoRoot)src\Installers\Windows\AspNetCoreModule-Setup\ANCMIISExpressV2\AncmIISExpressV2.wixproj"AdditionalProperties="Platform=arm64" />
<InstallerProjectInclude="$(RepoRoot)src\Installers\Windows\AspNetCoreModule-Setup\ANCMV2\ANCMV2.wixproj"AdditionalProperties="Platform=x64" />
<InstallerProjectInclude="$(RepoRoot)src\Installers\Windows\AspNetCoreModule-Setup\ANCMV2\ANCMV2.wixproj"AdditionalProperties="Platform=x86" />
<InstallerProjectInclude="$(RepoRoot)src\Installers\Windows\AspNetCoreModule-Setup\ANCMV2\ANCMV2.wixproj"AdditionalProperties="Platform=arm64" />
<!-- Windows hosting bundle -->
<InstallerProjectInclude="$(RepoRoot)src\Installers\Windows\WindowsHostingBundle\WindowsHostingBundle.wixproj"AdditionalProperties="Platform=x86" />
</ItemGroup>
<ItemGroup>
<ProjectToBuildCondition=" '$(BuildInstallers)' == 'true'"Include="@(InstallerProject)"BuildStep="installer" />
</ItemGroup>
</Otherwise>
</Choose>
</Project>