Skip to content

Build primarily with dotnet msbuild #22017

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
May 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 19 additions & 10 deletions .azure/pipelines/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ variables:
- ${{ if eq(variables['System.TeamProject'], 'internal') }}:
- group: DotNet-MSRC-Storage
- name: _InternalRuntimeDownloadArgs
value: -DotNetRuntimeSourceFeed https://dotnetclimsrc.blob.core.windows.net/dotnet -DotNetRuntimeSourceFeedKey $(dotnetclimsrc-read-sas-token-base64) /p:DotNetAssetRootAccessTokenSuffix='$(dotnetclimsrc-read-sas-token-base64)'
value: -DotNetRuntimeSourceFeed https://dotnetclimsrc.blob.core.windows.net/dotnet -DotNetRuntimeSourceFeedKey
$(dotnetclimsrc-read-sas-token-base64) /p:DotNetAssetRootAccessTokenSuffix='$(dotnetclimsrc-read-sas-token-base64)'
# The code signing doesn't use the aspnet build scripts, so the msbuild parameters have
# to be passed directly. This is awkward, since we pass the same info above, but we have
# to have it in two different forms
Expand Down Expand Up @@ -140,32 +141,35 @@ stages:
- script: ./build.cmd
-ci
-nobl
-noBuildRepoTasks
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This and the -noBuildNative additions are minor optimizations that also decrease the noise in the builds

-arch x86
-pack
-all
-noBuildJava
-noBuildNative
/p:OnlyPackPlatformSpecificPackages=true
$(_BuildArgs)
$(_InternalRuntimeDownloadArgs)
displayName: Build x86

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

# 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,
# consider running code-signing inline with the other previous steps.
# Sign check is disabled because it is run in a separate step below, after installers are built.
# 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, consider running code-signing inline with the other
# previous steps. Sign check is disabled because it is run in a separate step below, after installers are built.
- script: ./build.cmd
-ci
-nobl
-noBuildRepoTasks
-noBuild
-noRestore
-sign
Expand All @@ -177,6 +181,7 @@ stages:
- script: ./build.cmd
-ci
-nobl
-noBuildRepoTasks
-sign
-buildInstallers
/p:DotNetSignType=$(_SignType)
Expand Down Expand Up @@ -492,7 +497,9 @@ stages:
jobDisplayName: "Test: Windows Server 2016 x64"
agentOs: Windows
isTestingJob: true
buildArgs: -all -pack -test "/p:SkipHelixReadyTests=true /p:SkipIISNewHandlerTests=true /p:SkipIISTests=true /p:SkipIISExpressTests=true /p:SkipIISNewShimTests=true /p:RunTemplateTests=false" $(_InternalRuntimeDownloadArgs)
buildArgs: -all -pack -test /p:SkipHelixReadyTests=true /p:SkipIISNewHandlerTests=true /p:SkipIISTests=true
/p:SkipIISExpressTests=true /p:SkipIISNewShimTests=true /p:RunTemplateTests=false
$(_InternalRuntimeDownloadArgs)
beforeBuild:
- powershell: "& ./src/Servers/IIS/tools/UpdateIISExpressCertificate.ps1; & ./src/Servers/IIS/tools/update_schema.ps1"
displayName: Setup IISExpress test certificates and schema
Expand Down Expand Up @@ -530,9 +537,9 @@ stages:
steps:
- script: ./build.cmd -ci -nobl -all -pack $(_InternalRuntimeDownloadArgs)
displayName: Build Repo
- script: ./src/ProjectTemplates/build.cmd -ci -nobl -pack -NoRestore -NoBuilddeps "/p:RunTemplateTests=true"
- script: ./src/ProjectTemplates/build.cmd -ci -nobl -noBuildRepoTasks -pack -NoRestore -NoBuilddeps "/p:RunTemplateTests=true"
displayName: Pack Templates
- script: ./src/ProjectTemplates/build.cmd -ci -nobl -test -NoRestore -NoBuild -NoBuilddeps "/p:RunTemplateTests=true"
- script: ./src/ProjectTemplates/build.cmd -ci -nobl -noBuildRepoTasks -test -NoRestore -NoBuild -NoBuilddeps "/p:RunTemplateTests=true"
displayName: Test Templates
artifacts:
- name: Windows_Test_Templates_Dumps
Expand Down Expand Up @@ -632,9 +639,11 @@ stages:
# Build the shared framework
- script: ./build.cmd -ci -nobl -all -pack -arch x64 /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log
displayName: Build shared fx
- script: .\restore.cmd -ci -nobl /p:BuildInteropProjects=true
- script: ./build.cmd -ci -nobl -noBuildRepoTasks -restore -noBuild -projects src/Grpc/**/*.csproj
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Previously this would restore everything again, plus the interop projects. That's a waste and doesn't work correctly because ./restore.cmd adds --all but ./build.ps1 will pass $(BuildInteropProjects) into the VS build, causing the restore op to fail. So, this replacement is both a correction and an optimization.

displayName: Restore interop projects
- 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
- script: ./build.cmd -ci -nobl -noBuildRepoTasks -noRestore -test -all -noBuildNative -projects eng\helix\helix.proj
/p:IsRequiredCheck=true /p:IsHelixJob=true /p:BuildInteropProjects=true /p:RunTemplateTests=true
/p:ASPNETCORE_TEST_LOG_DIR=artifacts/log
displayName: Run build.cmd helix target
env:
HelixApiAccessToken: $(HelixApiAccessToken) # Needed for internal queues
Expand Down
18 changes: 11 additions & 7 deletions .azure/pipelines/helix-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ schedules:
include:
- master
always: true

variables:
- ${{ if ne(variables['System.TeamProject'], 'internal') }}:
- name: _UseHelixOpenQueues
value: 'true'
- ${{ if eq(variables['System.TeamProject'], 'internal') }}:
- group: DotNet-HelixApi-Access
- name: _UseHelixOpenQueues
value: 'false'
value: 'false'

jobs:
- template: jobs/default-build.yml
parameters:
Expand All @@ -28,9 +28,11 @@ jobs:
# Build the shared framework
- script: ./build.cmd -ci -nobl -all -pack -arch x64 /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log
displayName: Build shared fx
- script: .\restore.cmd -ci /p:BuildInteropProjects=true
- script: ./build.cmd -ci -nobl -noBuildRepoTasks -restore -noBuild -projects src/Grpc/**/*.csproj
displayName: Restore interop projects
- 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
- script: .\build.cmd -ci -nobl -noBuildRepoTasks -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
displayName: Run build.cmd helix target
env:
HelixApiAccessToken: $(HelixApiAccessToken) # Needed for internal queues
Expand All @@ -39,7 +41,7 @@ jobs:
- name: Helix_logs
path: artifacts/log/
publishOnError: true

# Helix ARM64
- template: jobs/default-build.yml
parameters:
Expand All @@ -50,7 +52,9 @@ jobs:
steps:
- script: ./restore.sh -ci -nobl
displayName: Restore
- 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
- script: ./build.sh --ci --nobl --noBuildRepoTasks --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
displayName: Run build.sh helix arm64 target
env:
HelixApiAccessToken: $(HelixApiAccessToken) # Needed for internal queues
Expand Down
1 change: 1 addition & 0 deletions .azure/pipelines/jobs/codesign-xplat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ jobs:
flattenFolders: true
- powershell: .\eng\common\build.ps1
-ci
-nobl
-restore
-sign
-publish
Expand Down
9 changes: 7 additions & 2 deletions .azure/pipelines/jobs/default-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,16 @@ jobs:
${{ if eq(parameters.agentOs, 'Windows') }}:
${{ if eq(variables['System.TeamProject'], 'public') }}:
name: NetCorePublic-Pool
queue: BuildPool.Windows.10.Amd64.VS2019.Pre.Open
${{ if ne(parameters.isTestingJob, true) }}:
# Visual Studio Build Tools
queue: BuildPool.Server.Amd64.VS2019.BT.Open
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, we don't need the preview queues anymore 😺

${{ if eq(parameters.isTestingJob, true) }}:
# Visual Studio Enterprise - contains some stuff, like SQL Server and IIS Express, that we use for testing
queue: BuildPool.Server.Amd64.VS2019.Open
${{ if eq(variables['System.TeamProject'], 'internal') }}:
name: NetCoreInternal-Pool
# Visual Studio Enterprise - contains some stuff, like SQL Server and IIS Express, that we use for testing
queue: BuildPool.Windows.10.Amd64.VS2019.Pre
queue: BuildPool.Server.Amd64.VS2019
variables:
- AgentOsName: ${{ parameters.agentOs }}
- ASPNETCORE_TEST_LOG_MAXPATH: "200" # Keep test log file name length low enough for artifact zipping
Expand Down
8 changes: 5 additions & 3 deletions .azure/pipelines/quarantined-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,13 @@ jobs:
timeoutInMinutes: 240
steps:
# Build the shared framework
- script: ./build.cmd -ci -all -pack -arch x64 /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log /bl:artifacts/log/helix.build.x64.binlog
- script: ./build.cmd -ci -nobl -all -pack -arch x64 /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log
displayName: Build shared fx
- script: .\restore.cmd -ci /p:BuildInteropProjects=true
- script: ./build.cmd -ci -nobl -noBuildRepoTasks -restore -noBuild -projects src/Grpc/**/*.csproj
displayName: Restore interop projects
- 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
- script: ./build.cmd -ci -nobl -noBuildRepoTasks -noRestore -test -all -noBuildJava -noBuildNative
-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
displayName: Run build.cmd helix target
env:
HelixApiAccessToken: $(HelixApiAccessToken) # Needed for internal queues
Expand Down
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@
<!-- Projects which reference Microsoft.AspNetCore.Mvc.Testing should import this targets file to ensure dependency .deps.json files are copied into test output. -->
<MvcTestingTargets>$(MSBuildThisFileDirectory)src\Mvc\Mvc.Testing\src\Microsoft.AspNetCore.Mvc.Testing.targets</MvcTestingTargets>
<!-- IIS native projects can only be built on Windows for x86 and x64. -->
<BuildIisNativeProjects Condition=" $(BuildNative) AND ('$(TargetArchitecture)' == 'x86' OR '$(TargetArchitecture)' == 'x64') ">true</BuildIisNativeProjects>
<BuildIisNativeProjects Condition=" '$(TargetOsName)' == 'win' AND ('$(TargetArchitecture)' == 'x86' OR '$(TargetArchitecture)' == 'x64') ">true</BuildIisNativeProjects>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the motivation for this logical change?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The $(BuildIisNativeProjects) property is really badly named. It actually controls whether the native assets are even looked for. We had the infrastructure in place to find the assets if they were build earlier but weren't using it. So, without this change, the native build would produce assemblies the managed build ignored.

<!-- This property is shared by several projects to layout the AspNetCore.App targeting pack for installers -->
<TargetingPackLayoutRoot>$(ArtifactsObjDir)TargetingPack.Layout\$(Configuration)\</TargetingPackLayoutRoot>
<!-- This property is shared by several projects to layout the AspNetCore.App shared framework for installers -->
Expand Down
81 changes: 55 additions & 26 deletions build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,8 @@ param(

[switch]$NoBuildRepoTasks,

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

# Diagnostics
Expand Down Expand Up @@ -187,10 +186,6 @@ if ($DumpProcesses -or $CI) {
}

# Project selection
if ($All) {
$MSBuildArguments += '/p:BuildAllProjects=true'
}

if ($Projects) {
if (![System.IO.Path]::IsPathRooted($Projects))
{
Expand Down Expand Up @@ -227,20 +222,8 @@ if ($BuildManaged -or ($All -and (-not $NoBuildManaged))) {
}
}

if ($BuildInstallers) { $MSBuildArguments += "/p:BuildInstallers=true" }
if ($BuildManaged) { $MSBuildArguments += "/p:BuildManaged=true" }
if ($BuildNative) { $MSBuildArguments += "/p:BuildNative=true" }
if ($BuildNodeJS) { $MSBuildArguments += "/p:BuildNodeJS=true" }
if ($BuildJava) { $MSBuildArguments += "/p:BuildJava=true" }

if ($NoBuildDeps) { $MSBuildArguments += "/p:BuildProjectReferences=false" }

if ($NoBuildInstallers) { $MSBuildArguments += "/p:BuildInstallers=false" }
if ($NoBuildManaged) { $MSBuildArguments += "/p:BuildManaged=false" }
if ($NoBuildNative) { $MSBuildArguments += "/p:BuildNative=false" }
if ($NoBuildNodeJS) { $MSBuildArguments += "/p:BuildNodeJS=false" }
if ($NoBuildJava) { $MSBuildArguments += "/p:BuildJava=false" }

$RunBuild = if ($NoBuild) { $false } else { $true }

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

# Split build categories between dotnet msbuild and desktop msbuild. Use desktop msbuild as little as possible.
[string[]]$dotnetBuildArguments = $MSBuildArguments
if ($All) { $dotnetBuildArguments += '/p:BuildAllProjects=true'; $BuildNative = $true }

if ($NoBuildInstallers) { $MSBuildArguments += "/p:BuildInstallers=false"; $BuildInstallers = $false }
if ($BuildInstallers) { $MSBuildArguments += "/p:BuildInstallers=true" }
if ($NoBuildNative) { $MSBuildArguments += "/p:BuildNative=false"; $BuildNative = $false }
if ($BuildNative) { $MSBuildArguments += "/p:BuildNative=true"}

if ($NoBuildJava) { $dotnetBuildArguments += "/p:BuildJava=false"; $BuildJava = $false }
if ($BuildJava) { $dotnetBuildArguments += "/p:BuildJava=true" }
if ($NoBuildManaged) { $dotnetBuildArguments += "/p:BuildManaged=false"; $BuildManaged = $false }
if ($BuildManaged) { $dotnetBuildArguments += "/p:BuildManaged=true" }
if ($NoBuildNodeJS) { $dotnetBuildArguments += "/p:BuildNodeJS=false"; $BuildNodeJS = $false }
if ($BuildNodeJS) { $dotnetBuildArguments += "/p:BuildNodeJS=true" }

# Don't bother with two builds if just one will build everything. Ignore super-weird cases like
# "-Projects ... -NoBuildJava -NoBuildManaged -NoBuildNodeJS".
$ForceCoreMsbuild = $ForceCoreMsbuild -or -not ($BuildInstallers -or $BuildNative) -or `
$Architecture.StartsWith("arm", [System.StringComparison]::OrdinalIgnoreCase)
$performDotnetBuild = $ForceCoreMsbuild -or $BuildJava -or $BuildManaged -or $BuildNodeJS -or `
($All -and -not ($NoBuildJava -and $NoBuildManaged -and $NoBuildNodeJS)) -or `
($Projects -and -not ($BuildInstallers -or $BuildNative))

$foundJdk = $false
$javac = Get-Command javac -ErrorAction Ignore -CommandType Application
$localJdkPath = "$PSScriptRoot\.tools\jdk\win-x64\"
Expand Down Expand Up @@ -343,9 +350,8 @@ $env:MSBUILDDISABLENODEREUSE=1
# Fixing this is tracked by https://github.com/dotnet/aspnetcore-internal/issues/601
$warnAsError = $false

if ($ForceCoreMsbuild) {
$msbuildEngine = 'dotnet'
}
# Use `dotnet msbuild` by default
$msbuildEngine = 'dotnet'

# Ensure passing neither -bl nor -nobl on CI avoids errors in tools.ps1. This is needed because both parameters are
# $false by default i.e. they always exist. (We currently avoid binary logs but that is made visible in the YAML.)
Expand All @@ -367,7 +373,16 @@ Remove-Item variable:global:_MSBuildExe -ea Ignore
if ($BinaryLog) {
$bl = GetMSBuildBinaryLogCommandLineArgument($MSBuildArguments)
if (-not $bl) {
$MSBuildArguments += "/bl:" + (Join-Path $LogDir "Build.binlog")
$dotnetBuildArguments += "/bl:" + (Join-Path $LogDir "Build.binlog")
$MSBuildArguments += "/bl:" + (Join-Path $LogDir "Build.native.binlog")
$ToolsetBuildArguments += "/bl:" + (Join-Path $LogDir "Build.repotasks.binlog")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not relevant in CI but will be helpful when we re-enable binary logs.

} else {
# Use a different binary log path when running desktop msbuild if doing both builds.
if (-not $ForceCoreMsbuild -and $performDotnetBuild) {
$MSBuildArguments += [System.IO.Path]::ChangeExtension($bl, "native.binlog")
}

$ToolsetBuildArguments += [System.IO.Path]::ChangeExtension($bl, "repotasks.binlog")
}
} elseif ($CI) {
# Ensure the artifacts/log directory isn't empty to avoid warnings.
Expand All @@ -394,6 +409,8 @@ try {
}

if (-not $NoBuildRepoTasks) {
Write-Host

MSBuild $toolsetBuildProj `
/p:RepoRoot=$RepoRoot `
/p:Projects=$EngRoot\tools\RepoTasks\RepoTasks.csproj `
Expand All @@ -404,9 +421,21 @@ try {
@ToolsetBuildArguments
}

MSBuild $toolsetBuildProj `
/p:RepoRoot=$RepoRoot `
@MSBuildArguments
if (-not $ForceCoreMsbuild) {
Write-Host
Remove-Item variable:global:_BuildTool -ErrorAction Ignore
$msbuildEngine = 'vs'

MSBuild $toolsetBuildProj /p:RepoRoot=$RepoRoot @MSBuildArguments
}

if ($performDotnetBuild) {
Write-Host
Remove-Item variable:global:_BuildTool -ErrorAction Ignore
$msbuildEngine = 'dotnet'

MSBuild $toolsetBuildProj /p:RepoRoot=$RepoRoot @dotnetBuildArguments
}
}
catch {
Write-Host $_.ScriptStackTrace
Expand Down
3 changes: 2 additions & 1 deletion eng/AfterSolutionBuild.targets
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
<Import Project="SharedFramework.Local.props" />

<!-- This is temporary until we can use FrameworkReference to build our own packages. -->
<Target Name="RemoveSharedFrameworkOnlyRefsFromNuspec" AfterTargets="Pack">
<Target Name="RemoveSharedFrameworkOnlyRefsFromNuspec" AfterTargets="Pack"
Condition=" '$(MSBuildRuntimeType)' == 'core' ">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why was the condition added?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A single build.cmd invocation now runs the MSBuild PowerShell function twice (three times including the repo tasks) and both would redo this step if the dev had built the repo earlier. Since the fixup only matters for managed packages and we only build managed packages in the dotnet msbuild invocation, this is safe and quiets things down.

<ItemGroup>
<_BuildOutput Include="$(ArtifactsShippingPackagesDir)*.nupkg"
Exclude="$(ArtifactsShippingPackagesDir)*.symbols.nupkg" />
Expand Down
12 changes: 5 additions & 7 deletions eng/Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,12 @@
Include="$(RepoRoot)src\Installers\Rpm\**\*.*proj" />
</ItemGroup>

<ItemGroup>
<NativeProjects Condition=" '$(TargetOsName)' == 'win' AND ('$(TargetArchitecture)' == 'x86' OR '$(TargetArchitecture)' == 'x64') "
Include="$(RepoRoot)src\**\*.vcxproj" Exclude="@(ProjectToExclude)">
<!-- Required to prevent triggering double-builds. See src\Servers\IIS\ResolveIisReferences.targets for details. -->
<AdditionalProperties Condition="'$(TargetArchitecture)' == 'x64'">Platform=x64</AdditionalProperties>
<AdditionalProperties Condition="'$(TargetArchitecture)' == 'x86'">Platform=Win32</AdditionalProperties>
</NativeProjects>
<ItemGroup Condition=" '$(TargetOsName)' == 'win' AND ('$(TargetArchitecture)' == 'x86' OR '$(TargetArchitecture)' == 'x64') ">
<NativeProjects Include="$(RepoRoot)src\**\*.vcxproj" Exclude="@(ProjectToExclude)" AdditionalProperties="Platform=x64" />
<NativeProjects Include="$(RepoRoot)src\**\*.vcxproj" Exclude="@(ProjectToExclude)" AdditionalProperties="Platform=Win32" />
</ItemGroup>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was concerned about doing both of the $(Platform)s in one build but saw no flakiness in multiple trial builds (mostly while I was working to get CodeCheck.ps1 working again)


<ItemGroup>
<ProjectToBuild Condition=" $(BuildNative) " Include="@(NativeProjects)" Exclude="@(ProjectToExclude)" />
<ProjectToExclude Condition=" !$(BuildNative) " Include="@(NativeProjects)" />

Expand Down
Loading