Skip to content

Commit 14d6b6e

Browse files
authored
Build primarily with dotnet msbuild (#22017)
* Make `dotnet msbuild` the default on Windows too - add step using desktop `msbuild` when native builds may be involved - `-All` (without `-NoBuildNative`), `-BuildNative` or `-BuildInstallers` run this step - but `-ForceCoreMsbuild` unconditionally skips this step nits: - add binary log for RepoTasks build if `$BinaryLog` (echoes the `dotnet msbuild` command) - add blank lines between build steps * Enable building managed projects depending on native assets - splitting native builds out confuses these projects - use `$(BuildNative)` less, only to control actual building (not bundling) - build both native platforms in one `msbuild` invocation * Adjust generation scripts to explicitly choose the MSBuild engine - ensure native assets are included in GenerateReferenceAssemblies.ps1 build - clean up the global state that tools.ps1 corrupts * Revert move to VS2019.Pre queues This reverts part of commit b67d161 - was "[release/5.0-preview5] Update dependencies from dotnet/aspnetcore-tooling (#21710)" * Revert "!temporary! Require `msbuild` from VS2019 16.6" - this reverts commit 58cf230 * Reduce build duplication in pipelines - build native assets and repo tasks once per CI job - only cleanup framework references after packing managed projects nits: - wrap a few long lines - remove extra `-forceCoreMsbuild` options in SiteExtensions' build.cmd * Fix Helix jobs - restore.cmd doesn't work well with `-projects`; script unconditionally adds `-all` * !fixup! Reduce duplications further - missed a couple of places `-noBuildRepoTasks` helps * Cleanup: Remove a few dangling binary logs * !fixup! Correct typos in generation scripts * !fixup! Another typo in the generation scripts
1 parent b9800cf commit 14d6b6e

15 files changed

+152
-80
lines changed

.azure/pipelines/ci.yml

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ variables:
4747
- ${{ if eq(variables['System.TeamProject'], 'internal') }}:
4848
- group: DotNet-MSRC-Storage
4949
- name: _InternalRuntimeDownloadArgs
50-
value: -DotNetRuntimeSourceFeed https://dotnetclimsrc.blob.core.windows.net/dotnet -DotNetRuntimeSourceFeedKey $(dotnetclimsrc-read-sas-token-base64) /p:DotNetAssetRootAccessTokenSuffix='$(dotnetclimsrc-read-sas-token-base64)'
50+
value: -DotNetRuntimeSourceFeed https://dotnetclimsrc.blob.core.windows.net/dotnet -DotNetRuntimeSourceFeedKey
51+
$(dotnetclimsrc-read-sas-token-base64) /p:DotNetAssetRootAccessTokenSuffix='$(dotnetclimsrc-read-sas-token-base64)'
5152
# The code signing doesn't use the aspnet build scripts, so the msbuild parameters have
5253
# to be passed directly. This is awkward, since we pass the same info above, but we have
5354
# to have it in two different forms
@@ -140,32 +141,35 @@ stages:
140141
- script: ./build.cmd
141142
-ci
142143
-nobl
144+
-noBuildRepoTasks
143145
-arch x86
144146
-pack
145147
-all
146148
-noBuildJava
149+
-noBuildNative
147150
/p:OnlyPackPlatformSpecificPackages=true
148151
$(_BuildArgs)
149152
$(_InternalRuntimeDownloadArgs)
150153
displayName: Build x86
151154

152-
# This is in a separate build step with -forceCoreMsbuild to workaround MAX_PATH limitations - https://github.com/Microsoft/msbuild/issues/53
153155
- script: .\src\SiteExtensions\build.cmd
154156
-ci
155157
-nobl
158+
-noBuildRepoTasks
156159
-pack
157160
-noBuildDeps
158161
$(_BuildArgs)
159162
$(_InternalRuntimeDownloadArgs)
160163
condition: ne(variables['Build.Reason'], 'PullRequest')
161164
displayName: Build SiteExtension
162165

163-
# This runs code-signing on all packages, zips, and jar files as defined in build/CodeSign.targets. If https://github.com/dotnet/arcade/issues/1957 is resolved,
164-
# consider running code-signing inline with the other previous steps.
165-
# Sign check is disabled because it is run in a separate step below, after installers are built.
166+
# This runs code-signing on all packages, zips, and jar files as defined in build/CodeSign.targets. If
167+
# https://github.com/dotnet/arcade/issues/1957 is resolved, consider running code-signing inline with the other
168+
# previous steps. Sign check is disabled because it is run in a separate step below, after installers are built.
166169
- script: ./build.cmd
167170
-ci
168171
-nobl
172+
-noBuildRepoTasks
169173
-noBuild
170174
-noRestore
171175
-sign
@@ -177,6 +181,7 @@ stages:
177181
- script: ./build.cmd
178182
-ci
179183
-nobl
184+
-noBuildRepoTasks
180185
-sign
181186
-buildInstallers
182187
/p:DotNetSignType=$(_SignType)
@@ -492,7 +497,9 @@ stages:
492497
jobDisplayName: "Test: Windows Server 2016 x64"
493498
agentOs: Windows
494499
isTestingJob: true
495-
buildArgs: -all -pack -test "/p:SkipHelixReadyTests=true /p:SkipIISNewHandlerTests=true /p:SkipIISTests=true /p:SkipIISExpressTests=true /p:SkipIISNewShimTests=true /p:RunTemplateTests=false" $(_InternalRuntimeDownloadArgs)
500+
buildArgs: -all -pack -test /p:SkipHelixReadyTests=true /p:SkipIISNewHandlerTests=true /p:SkipIISTests=true
501+
/p:SkipIISExpressTests=true /p:SkipIISNewShimTests=true /p:RunTemplateTests=false
502+
$(_InternalRuntimeDownloadArgs)
496503
beforeBuild:
497504
- powershell: "& ./src/Servers/IIS/tools/UpdateIISExpressCertificate.ps1; & ./src/Servers/IIS/tools/update_schema.ps1"
498505
displayName: Setup IISExpress test certificates and schema
@@ -530,9 +537,9 @@ stages:
530537
steps:
531538
- script: ./build.cmd -ci -nobl -all -pack $(_InternalRuntimeDownloadArgs)
532539
displayName: Build Repo
533-
- script: ./src/ProjectTemplates/build.cmd -ci -nobl -pack -NoRestore -NoBuilddeps "/p:RunTemplateTests=true"
540+
- script: ./src/ProjectTemplates/build.cmd -ci -nobl -noBuildRepoTasks -pack -NoRestore -NoBuilddeps "/p:RunTemplateTests=true"
534541
displayName: Pack Templates
535-
- script: ./src/ProjectTemplates/build.cmd -ci -nobl -test -NoRestore -NoBuild -NoBuilddeps "/p:RunTemplateTests=true"
542+
- script: ./src/ProjectTemplates/build.cmd -ci -nobl -noBuildRepoTasks -test -NoRestore -NoBuild -NoBuilddeps "/p:RunTemplateTests=true"
536543
displayName: Test Templates
537544
artifacts:
538545
- name: Windows_Test_Templates_Dumps
@@ -632,9 +639,11 @@ stages:
632639
# Build the shared framework
633640
- script: ./build.cmd -ci -nobl -all -pack -arch x64 /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log
634641
displayName: Build shared fx
635-
- script: .\restore.cmd -ci -nobl /p:BuildInteropProjects=true
642+
- script: ./build.cmd -ci -nobl -noBuildRepoTasks -restore -noBuild -projects src/Grpc/**/*.csproj
636643
displayName: Restore interop projects
637-
- script: .\build.cmd -ci -nobl -NoRestore -test -all -projects eng\helix\helix.proj /p:IsRequiredCheck=true /p:IsHelixJob=true /p:BuildInteropProjects=true /p:RunTemplateTests=true /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log
644+
- script: ./build.cmd -ci -nobl -noBuildRepoTasks -noRestore -test -all -noBuildNative -projects eng\helix\helix.proj
645+
/p:IsRequiredCheck=true /p:IsHelixJob=true /p:BuildInteropProjects=true /p:RunTemplateTests=true
646+
/p:ASPNETCORE_TEST_LOG_DIR=artifacts/log
638647
displayName: Run build.cmd helix target
639648
env:
640649
HelixApiAccessToken: $(HelixApiAccessToken) # Needed for internal queues

.azure/pipelines/helix-matrix.yml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,16 @@ schedules:
77
include:
88
- master
99
always: true
10-
10+
1111
variables:
1212
- ${{ if ne(variables['System.TeamProject'], 'internal') }}:
1313
- name: _UseHelixOpenQueues
1414
value: 'true'
1515
- ${{ if eq(variables['System.TeamProject'], 'internal') }}:
1616
- group: DotNet-HelixApi-Access
1717
- name: _UseHelixOpenQueues
18-
value: 'false'
19-
18+
value: 'false'
19+
2020
jobs:
2121
- template: jobs/default-build.yml
2222
parameters:
@@ -28,9 +28,11 @@ jobs:
2828
# Build the shared framework
2929
- script: ./build.cmd -ci -nobl -all -pack -arch x64 /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log
3030
displayName: Build shared fx
31-
- script: .\restore.cmd -ci /p:BuildInteropProjects=true
31+
- script: ./build.cmd -ci -nobl -noBuildRepoTasks -restore -noBuild -projects src/Grpc/**/*.csproj
3232
displayName: Restore interop projects
33-
- script: .\build.cmd -ci -nobl -NoRestore -test -all -projects eng\helix\helix.proj /p:IsHelixDaily=true /p:IsRequiredCheck=true /p:IsHelixJob=true /p:BuildInteropProjects=true /p:RunTemplateTests=true /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log
33+
- script: .\build.cmd -ci -nobl -noBuildRepoTasks -NoRestore -test -all -projects eng\helix\helix.proj
34+
/p:IsHelixDaily=true /p:IsRequiredCheck=true /p:IsHelixJob=true /p:BuildInteropProjects=true
35+
/p:RunTemplateTests=true /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log
3436
displayName: Run build.cmd helix target
3537
env:
3638
HelixApiAccessToken: $(HelixApiAccessToken) # Needed for internal queues
@@ -39,7 +41,7 @@ jobs:
3941
- name: Helix_logs
4042
path: artifacts/log/
4143
publishOnError: true
42-
44+
4345
# Helix ARM64
4446
- template: jobs/default-build.yml
4547
parameters:
@@ -50,7 +52,9 @@ jobs:
5052
steps:
5153
- script: ./restore.sh -ci -nobl
5254
displayName: Restore
53-
- script: ./build.sh -ci --nobl --arch arm64 -test --no-build-nodejs --all -projects $(Build.SourcesDirectory)/eng/helix/helix.proj /p:IsHelixJob=true /p:IsHelixDaily=true /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log
55+
- script: ./build.sh --ci --nobl --noBuildRepoTasks --arch arm64 -test --no-build-nodejs --all --projects
56+
$(Build.SourcesDirectory)/eng/helix/helix.proj /p:IsHelixJob=true /p:IsHelixDaily=true
57+
/p:ASPNETCORE_TEST_LOG_DIR=artifacts/log
5458
displayName: Run build.sh helix arm64 target
5559
env:
5660
HelixApiAccessToken: $(HelixApiAccessToken) # Needed for internal queues

.azure/pipelines/jobs/codesign-xplat.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ jobs:
3030
flattenFolders: true
3131
- powershell: .\eng\common\build.ps1
3232
-ci
33+
-nobl
3334
-restore
3435
-sign
3536
-publish

.azure/pipelines/jobs/default-build.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,16 @@ jobs:
104104
${{ if eq(parameters.agentOs, 'Windows') }}:
105105
${{ if eq(variables['System.TeamProject'], 'public') }}:
106106
name: NetCorePublic-Pool
107-
queue: BuildPool.Windows.10.Amd64.VS2019.Pre.Open
107+
${{ if ne(parameters.isTestingJob, true) }}:
108+
# Visual Studio Build Tools
109+
queue: BuildPool.Server.Amd64.VS2019.BT.Open
110+
${{ if eq(parameters.isTestingJob, true) }}:
111+
# Visual Studio Enterprise - contains some stuff, like SQL Server and IIS Express, that we use for testing
112+
queue: BuildPool.Server.Amd64.VS2019.Open
108113
${{ if eq(variables['System.TeamProject'], 'internal') }}:
109114
name: NetCoreInternal-Pool
110115
# Visual Studio Enterprise - contains some stuff, like SQL Server and IIS Express, that we use for testing
111-
queue: BuildPool.Windows.10.Amd64.VS2019.Pre
116+
queue: BuildPool.Server.Amd64.VS2019
112117
variables:
113118
- AgentOsName: ${{ parameters.agentOs }}
114119
- ASPNETCORE_TEST_LOG_MAXPATH: "200" # Keep test log file name length low enough for artifact zipping

.azure/pipelines/quarantined-tests.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,13 @@ jobs:
3131
timeoutInMinutes: 240
3232
steps:
3333
# Build the shared framework
34-
- script: ./build.cmd -ci -all -pack -arch x64 /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log /bl:artifacts/log/helix.build.x64.binlog
34+
- script: ./build.cmd -ci -nobl -all -pack -arch x64 /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log
3535
displayName: Build shared fx
36-
- script: .\restore.cmd -ci /p:BuildInteropProjects=true
36+
- script: ./build.cmd -ci -nobl -noBuildRepoTasks -restore -noBuild -projects src/Grpc/**/*.csproj
3737
displayName: Restore interop projects
38-
- script: .\build.cmd -ci -NoRestore -test -noBuildJava -all -projects eng\helix\helix.proj /p:RunQuarantinedTests=true /p:IsRequiredCheck=true /p:IsHelixJob=true /p:BuildInteropProjects=true /p:RunTemplateTests=true /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log -bl
38+
- script: ./build.cmd -ci -nobl -noBuildRepoTasks -noRestore -test -all -noBuildJava -noBuildNative
39+
-projects eng\helix\helix.proj /p:RunQuarantinedTests=true /p:IsRequiredCheck=true /p:IsHelixJob=true
40+
/p:BuildInteropProjects=true /p:RunTemplateTests=true /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log
3941
displayName: Run build.cmd helix target
4042
env:
4143
HelixApiAccessToken: $(HelixApiAccessToken) # Needed for internal queues

Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@
180180
<!-- Projects which reference Microsoft.AspNetCore.Mvc.Testing should import this targets file to ensure dependency .deps.json files are copied into test output. -->
181181
<MvcTestingTargets>$(MSBuildThisFileDirectory)src\Mvc\Mvc.Testing\src\Microsoft.AspNetCore.Mvc.Testing.targets</MvcTestingTargets>
182182
<!-- IIS native projects can only be built on Windows for x86 and x64. -->
183-
<BuildIisNativeProjects Condition=" $(BuildNative) AND ('$(TargetArchitecture)' == 'x86' OR '$(TargetArchitecture)' == 'x64') ">true</BuildIisNativeProjects>
183+
<BuildIisNativeProjects Condition=" '$(TargetOsName)' == 'win' AND ('$(TargetArchitecture)' == 'x86' OR '$(TargetArchitecture)' == 'x64') ">true</BuildIisNativeProjects>
184184
<!-- This property is shared by several projects to layout the AspNetCore.App targeting pack for installers -->
185185
<TargetingPackLayoutRoot>$(ArtifactsObjDir)TargetingPack.Layout\$(Configuration)\</TargetingPackLayoutRoot>
186186
<!-- This property is shared by several projects to layout the AspNetCore.App shared framework for installers -->

build.ps1

Lines changed: 55 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,8 @@ param(
146146

147147
[switch]$NoBuildRepoTasks,
148148

149-
# By default, Windows builds will use MSBuild.exe. Passing this will force the build to run on
150-
# dotnet.exe instead, which may cause issues if you invoke build on a project unsupported by
151-
# MSBuild for .NET Core
149+
# Disable pre-build of C++ code in x64 (default) and x86 builds. Affects -All and -Projects handling and causes
150+
# -BuildInstallers and -BuildNative to be ignored.
152151
[switch]$ForceCoreMsbuild,
153152

154153
# Diagnostics
@@ -187,10 +186,6 @@ if ($DumpProcesses -or $CI) {
187186
}
188187

189188
# Project selection
190-
if ($All) {
191-
$MSBuildArguments += '/p:BuildAllProjects=true'
192-
}
193-
194189
if ($Projects) {
195190
if (![System.IO.Path]::IsPathRooted($Projects))
196191
{
@@ -227,20 +222,8 @@ if ($BuildManaged -or ($All -and (-not $NoBuildManaged))) {
227222
}
228223
}
229224

230-
if ($BuildInstallers) { $MSBuildArguments += "/p:BuildInstallers=true" }
231-
if ($BuildManaged) { $MSBuildArguments += "/p:BuildManaged=true" }
232-
if ($BuildNative) { $MSBuildArguments += "/p:BuildNative=true" }
233-
if ($BuildNodeJS) { $MSBuildArguments += "/p:BuildNodeJS=true" }
234-
if ($BuildJava) { $MSBuildArguments += "/p:BuildJava=true" }
235-
236225
if ($NoBuildDeps) { $MSBuildArguments += "/p:BuildProjectReferences=false" }
237226

238-
if ($NoBuildInstallers) { $MSBuildArguments += "/p:BuildInstallers=false" }
239-
if ($NoBuildManaged) { $MSBuildArguments += "/p:BuildManaged=false" }
240-
if ($NoBuildNative) { $MSBuildArguments += "/p:BuildNative=false" }
241-
if ($NoBuildNodeJS) { $MSBuildArguments += "/p:BuildNodeJS=false" }
242-
if ($NoBuildJava) { $MSBuildArguments += "/p:BuildJava=false" }
243-
244227
$RunBuild = if ($NoBuild) { $false } else { $true }
245228

246229
# Run restore by default unless -NoRestore is set.
@@ -276,6 +259,30 @@ if ($DotNetRuntimeSourceFeed -or $DotNetRuntimeSourceFeedKey) {
276259
$ToolsetBuildArguments += $runtimeFeedKeyArg
277260
}
278261

262+
# Split build categories between dotnet msbuild and desktop msbuild. Use desktop msbuild as little as possible.
263+
[string[]]$dotnetBuildArguments = $MSBuildArguments
264+
if ($All) { $dotnetBuildArguments += '/p:BuildAllProjects=true'; $BuildNative = $true }
265+
266+
if ($NoBuildInstallers) { $MSBuildArguments += "/p:BuildInstallers=false"; $BuildInstallers = $false }
267+
if ($BuildInstallers) { $MSBuildArguments += "/p:BuildInstallers=true" }
268+
if ($NoBuildNative) { $MSBuildArguments += "/p:BuildNative=false"; $BuildNative = $false }
269+
if ($BuildNative) { $MSBuildArguments += "/p:BuildNative=true"}
270+
271+
if ($NoBuildJava) { $dotnetBuildArguments += "/p:BuildJava=false"; $BuildJava = $false }
272+
if ($BuildJava) { $dotnetBuildArguments += "/p:BuildJava=true" }
273+
if ($NoBuildManaged) { $dotnetBuildArguments += "/p:BuildManaged=false"; $BuildManaged = $false }
274+
if ($BuildManaged) { $dotnetBuildArguments += "/p:BuildManaged=true" }
275+
if ($NoBuildNodeJS) { $dotnetBuildArguments += "/p:BuildNodeJS=false"; $BuildNodeJS = $false }
276+
if ($BuildNodeJS) { $dotnetBuildArguments += "/p:BuildNodeJS=true" }
277+
278+
# Don't bother with two builds if just one will build everything. Ignore super-weird cases like
279+
# "-Projects ... -NoBuildJava -NoBuildManaged -NoBuildNodeJS".
280+
$ForceCoreMsbuild = $ForceCoreMsbuild -or -not ($BuildInstallers -or $BuildNative) -or `
281+
$Architecture.StartsWith("arm", [System.StringComparison]::OrdinalIgnoreCase)
282+
$performDotnetBuild = $ForceCoreMsbuild -or $BuildJava -or $BuildManaged -or $BuildNodeJS -or `
283+
($All -and -not ($NoBuildJava -and $NoBuildManaged -and $NoBuildNodeJS)) -or `
284+
($Projects -and -not ($BuildInstallers -or $BuildNative))
285+
279286
$foundJdk = $false
280287
$javac = Get-Command javac -ErrorAction Ignore -CommandType Application
281288
$localJdkPath = "$PSScriptRoot\.tools\jdk\win-x64\"
@@ -343,9 +350,8 @@ $env:MSBUILDDISABLENODEREUSE=1
343350
# Fixing this is tracked by https://github.com/dotnet/aspnetcore-internal/issues/601
344351
$warnAsError = $false
345352

346-
if ($ForceCoreMsbuild) {
347-
$msbuildEngine = 'dotnet'
348-
}
353+
# Use `dotnet msbuild` by default
354+
$msbuildEngine = 'dotnet'
349355

350356
# Ensure passing neither -bl nor -nobl on CI avoids errors in tools.ps1. This is needed because both parameters are
351357
# $false by default i.e. they always exist. (We currently avoid binary logs but that is made visible in the YAML.)
@@ -367,7 +373,16 @@ Remove-Item variable:global:_MSBuildExe -ea Ignore
367373
if ($BinaryLog) {
368374
$bl = GetMSBuildBinaryLogCommandLineArgument($MSBuildArguments)
369375
if (-not $bl) {
370-
$MSBuildArguments += "/bl:" + (Join-Path $LogDir "Build.binlog")
376+
$dotnetBuildArguments += "/bl:" + (Join-Path $LogDir "Build.binlog")
377+
$MSBuildArguments += "/bl:" + (Join-Path $LogDir "Build.native.binlog")
378+
$ToolsetBuildArguments += "/bl:" + (Join-Path $LogDir "Build.repotasks.binlog")
379+
} else {
380+
# Use a different binary log path when running desktop msbuild if doing both builds.
381+
if (-not $ForceCoreMsbuild -and $performDotnetBuild) {
382+
$MSBuildArguments += [System.IO.Path]::ChangeExtension($bl, "native.binlog")
383+
}
384+
385+
$ToolsetBuildArguments += [System.IO.Path]::ChangeExtension($bl, "repotasks.binlog")
371386
}
372387
} elseif ($CI) {
373388
# Ensure the artifacts/log directory isn't empty to avoid warnings.
@@ -394,6 +409,8 @@ try {
394409
}
395410

396411
if (-not $NoBuildRepoTasks) {
412+
Write-Host
413+
397414
MSBuild $toolsetBuildProj `
398415
/p:RepoRoot=$RepoRoot `
399416
/p:Projects=$EngRoot\tools\RepoTasks\RepoTasks.csproj `
@@ -404,9 +421,21 @@ try {
404421
@ToolsetBuildArguments
405422
}
406423

407-
MSBuild $toolsetBuildProj `
408-
/p:RepoRoot=$RepoRoot `
409-
@MSBuildArguments
424+
if (-not $ForceCoreMsbuild) {
425+
Write-Host
426+
Remove-Item variable:global:_BuildTool -ErrorAction Ignore
427+
$msbuildEngine = 'vs'
428+
429+
MSBuild $toolsetBuildProj /p:RepoRoot=$RepoRoot @MSBuildArguments
430+
}
431+
432+
if ($performDotnetBuild) {
433+
Write-Host
434+
Remove-Item variable:global:_BuildTool -ErrorAction Ignore
435+
$msbuildEngine = 'dotnet'
436+
437+
MSBuild $toolsetBuildProj /p:RepoRoot=$RepoRoot @dotnetBuildArguments
438+
}
410439
}
411440
catch {
412441
Write-Host $_.ScriptStackTrace

eng/AfterSolutionBuild.targets

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
<Import Project="SharedFramework.Local.props" />
66

77
<!-- This is temporary until we can use FrameworkReference to build our own packages. -->
8-
<Target Name="RemoveSharedFrameworkOnlyRefsFromNuspec" AfterTargets="Pack">
8+
<Target Name="RemoveSharedFrameworkOnlyRefsFromNuspec" AfterTargets="Pack"
9+
Condition=" '$(MSBuildRuntimeType)' == 'core' ">
910
<ItemGroup>
1011
<_BuildOutput Include="$(ArtifactsShippingPackagesDir)*.nupkg"
1112
Exclude="$(ArtifactsShippingPackagesDir)*.symbols.nupkg" />

eng/Build.props

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -84,14 +84,12 @@
8484
Include="$(RepoRoot)src\Installers\Rpm\**\*.*proj" />
8585
</ItemGroup>
8686

87-
<ItemGroup>
88-
<NativeProjects Condition=" '$(TargetOsName)' == 'win' AND ('$(TargetArchitecture)' == 'x86' OR '$(TargetArchitecture)' == 'x64') "
89-
Include="$(RepoRoot)src\**\*.vcxproj" Exclude="@(ProjectToExclude)">
90-
<!-- Required to prevent triggering double-builds. See src\Servers\IIS\ResolveIisReferences.targets for details. -->
91-
<AdditionalProperties Condition="'$(TargetArchitecture)' == 'x64'">Platform=x64</AdditionalProperties>
92-
<AdditionalProperties Condition="'$(TargetArchitecture)' == 'x86'">Platform=Win32</AdditionalProperties>
93-
</NativeProjects>
87+
<ItemGroup Condition=" '$(TargetOsName)' == 'win' AND ('$(TargetArchitecture)' == 'x86' OR '$(TargetArchitecture)' == 'x64') ">
88+
<NativeProjects Include="$(RepoRoot)src\**\*.vcxproj" Exclude="@(ProjectToExclude)" AdditionalProperties="Platform=x64" />
89+
<NativeProjects Include="$(RepoRoot)src\**\*.vcxproj" Exclude="@(ProjectToExclude)" AdditionalProperties="Platform=Win32" />
90+
</ItemGroup>
9491

92+
<ItemGroup>
9593
<ProjectToBuild Condition=" $(BuildNative) " Include="@(NativeProjects)" Exclude="@(ProjectToExclude)" />
9694
<ProjectToExclude Condition=" !$(BuildNative) " Include="@(NativeProjects)" />
9795

0 commit comments

Comments
 (0)