Skip to content

Commit 121c2f5

Browse files
authored
MSBUILD Server dogfood (#115766)
* updating based on review with Jemery Koritzinsky * Clean up environment variable definitions Removed redundant environment variable definitions for MSBUILDUSESERVER and DOTNET_CLI_USE_MSBUILD_SERVER. * adding an escape hatch for the dogfood * minor cleanup * Fix environment variable name for MSBuild server * affordance for old powershell
1 parent 49f1197 commit 121c2f5

File tree

5 files changed

+24
-0
lines changed

5 files changed

+24
-0
lines changed

eng/build.ps1

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,16 @@ if ($vs) {
266266
# Disable .NET runtime signature validation errors which errors for local builds
267267
$env:VSDebugger_ValidateDotnetDebugLibSignatures=0;
268268

269+
# MSBuild Server dogfood.
270+
if ($env:DOTNET_CLI_USE_MSBUILD_SERVER -eq $null)
271+
{
272+
$env:DOTNET_CLI_USE_MSBUILD_SERVER = 1
273+
}
274+
if ($env:MSBUILDUSESERVER -eq $null)
275+
{
276+
$env:MSBUILDUSESERVER = 1
277+
}
278+
269279
# Respect the RuntimeConfiguration variable for building inside VS with different runtime configurations
270280
if ($runtimeConfiguration)
271281
{

eng/build.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ while [[ -h "$source" ]]; do
1414
done
1515
scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
1616

17+
# MSBuild Server dogfood.
18+
export MSBUILDUSESERVER="${MSBUILDUSESERVER:-1}"
19+
export DOTNET_CLI_USE_MSBUILD_SERVER="${DOTNET_CLI_USE_MSBUILD_SERVER:-1}"
20+
1721
usage()
1822
{
1923
echo "Common settings:"

eng/pipelines/common/global-build-job.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,10 @@ jobs:
8181
- ${{ format('build_{0}{1}_{2}_{3}_{4}', parameters.osGroup, parameters.osSubgroup, parameters.archType, coalesce(globalBuild.buildConfig, parameters.buildConfig), globalBuild.nameSuffix) }}
8282

8383
variables:
84+
- name: "MSBUILDUSESERVER"
85+
value: "1"
86+
- name: "DOTNET_CLI_USE_MSBUILD_SERVER"
87+
value: "1"
8488
- ${{ if eq(variables['System.TeamProject'], 'internal') }}:
8589
- group: DotNet-HelixApi-Access
8690
- group: AzureDevOps-Artifact-Feeds-Pats

eng/pipelines/common/templates/global-build-step.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ parameters:
1212
steps:
1313
- script: $(Build.SourcesDirectory)$(dir)build$(scriptExt) -ci ${{ parameters.archParameter }} $(_osParameter) ${{ parameters.crossArg }} ${{ parameters.buildArgs }} ${{ parameters.targetCxxLibraryConfigurationArgs }} $(_officialBuildParameter) $(_overrideTestScriptWindowsCmdParameter)
1414
displayName: ${{ parameters.displayName }}
15+
env:
16+
MSBUILDUSESERVER: '1'
17+
DOTNET_CLI_USE_MSBUILD_SERVER: '1'
1518
${{ if eq(parameters.useContinueOnErrorDuringBuild, true) }}:
1619
continueOnError: ${{ parameters.shouldContinueOnError }}
1720
${{ if ne(parameters.container, '') }}:

eng/pipelines/global-build.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ extends:
6060
eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true),
6161
eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_non_mono_and_wasm.containsChange'], true),
6262
eq(variables['isRollingBuild'], true))
63+
env:
64+
MSBUILDUSESERVER: 1
65+
DOTNET_CLI_USE_MSBUILD_SERVER: 1
6366

6467
#
6568
# Build with RuntimeFlavor only. This exercise code paths where only RuntimeFlavor is

0 commit comments

Comments
 (0)