Skip to content

Commit 0c07fad

Browse files
committed
attempt with the current sdk
1 parent a9977cc commit 0c07fad

File tree

6 files changed

+31
-0
lines changed

6 files changed

+31
-0
lines changed

eng/common/core-templates/steps/send-to-helix.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ steps:
5959
HelixBaseUri: ${{ parameters.HelixBaseUri }}
6060
Creator: ${{ parameters.Creator }}
6161
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
62+
MSBUILDUSESERVER: 1
63+
DOTNET_CLI_USE_MSBUILD_SERVER: 1
6264
condition: and(${{ parameters.condition }}, eq(variables['Agent.Os'], 'Windows_NT'))
6365
continueOnError: ${{ parameters.continueOnError }}
6466
- script: $BUILD_SOURCESDIRECTORY/eng/common/msbuild.sh $BUILD_SOURCESDIRECTORY/${{ parameters.HelixProjectPath }} /restore /p:TreatWarningsAsErrors=false ${{ parameters.HelixProjectArguments }} /t:Test /bl:$BUILD_SOURCESDIRECTORY/artifacts/log/$BuildConfig/SendToHelix.binlog
@@ -89,5 +91,7 @@ steps:
8991
HelixBaseUri: ${{ parameters.HelixBaseUri }}
9092
Creator: ${{ parameters.Creator }}
9193
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
94+
MSBUILDUSESERVER: 1
95+
DOTNET_CLI_USE_MSBUILD_SERVER: 1
9296
condition: and(${{ parameters.condition }}, ne(variables['Agent.Os'], 'Windows_NT'))
9397
continueOnError: ${{ parameters.continueOnError }}

eng/common/tools.ps1

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,8 @@ function InitializeDotNetCli([bool]$install, [bool]$createSdkLocationFile) {
166166
# Disable telemetry on CI.
167167
if ($ci) {
168168
$env:DOTNET_CLI_TELEMETRY_OPTOUT=1
169+
$env:MSBUILDUSESERVER=1
170+
$env:DOTNET_CLI_USE_MSBUILD_SERVER=1
169171
}
170172

171173
# Find the first path on %PATH% that contains the dotnet.exe

eng/common/tools.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,8 @@ function InitializeDotNetCli {
124124
# Disable telemetry on CI
125125
if [[ $ci == true ]]; then
126126
export DOTNET_CLI_TELEMETRY_OPTOUT=1
127+
export MSBUILDUSESERVER=1
128+
export DOTNET_CLI_USE_MSBUILD_SERVER=1
127129
fi
128130

129131
# LTTNG is the logging infrastructure used by Core CLR. Need this variable set

eng/dotnet-format/dotnet-format-integration.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,16 @@ jobs:
8181
- template: /eng/common/templates/steps/enable-internal-sources.yml
8282
- script: .\restore.cmd ${{ parameters.runtimeSourceProperties }}
8383
displayName: 🟣 Restore dependencies
84+
env:
85+
MSBUILDUSESERVER: 1
86+
DOTNET_CLI_USE_MSBUILD_SERVER: 1
8487
- script: |
8588
.\artifacts\sdk-build-env.bat
8689
dotnet run --project .\src\BuiltInTools\dotnet-format\dotnet-format.csproj -c Release -- @eng\dotnet-format\validate.rsp
8790
displayName: 🟣 Run dotnet-format
91+
env:
92+
MSBUILDUSESERVER: 1
93+
DOTNET_CLI_USE_MSBUILD_SERVER: 1
8894
- task: ${{ parameters.oneESCompat.publishTaskPrefix }}PublishBuildArtifacts@1
8995
displayName: 🟣 Publish Logs
9096
inputs:
@@ -110,9 +116,18 @@ jobs:
110116
- template: /eng/common/templates/steps/enable-internal-sources.yml
111117
- script: eng\dotnet-format\integration-test.cmd -repo '${{ testArgs._repo }}' -branchName '${{ testArgs._branchName }}' -sha '${{ testArgs._sha }}' -targetSolution '${{ testArgs._targetSolution }}' -useParentSdk ${{ testArgs._useParentSdk }} -testPath '$(Agent.TempDirectory)\temp' -stage 'prepare' -runtimeSourceProperties '${{ parameters.runtimeSourceProperties }}'
112118
displayName: 🟣 Prepare ${{ testArgs._repoName }} for formatting
119+
env:
120+
MSBUILDUSESERVER: 1
121+
DOTNET_CLI_USE_MSBUILD_SERVER: 1
113122

114123
- script: eng\dotnet-format\integration-test.cmd -repo '${{ testArgs._repo }}' -branchName '${{ testArgs._branchName }}' -sha '${{ testArgs._sha }}' -targetSolution '${{ testArgs._targetSolution }}' -useParentSdk ${{ testArgs._useParentSdk }} -testPath '$(Agent.TempDirectory)\temp' -stage 'format-workspace'
115124
displayName: 🟣 Run dotnet-format on ${{ testArgs._repoName }} ${{ testArgs._targetSolution }}
125+
env:
126+
MSBUILDUSESERVER: 1
127+
DOTNET_CLI_USE_MSBUILD_SERVER: 1
116128

117129
- script: eng\dotnet-format\integration-test.cmd -repo '${{ testArgs._repo }}' -branchName '${{ testArgs._branchName }}' -sha '${{ testArgs._sha }}' -targetSolution '${{ testArgs._targetSolution }}' -useParentSdk ${{ testArgs._useParentSdk }} -testPath '$(Agent.TempDirectory)\temp' -stage 'format-folder'
118130
displayName: 🟣 Run dotnet-format on ${{ testArgs._repoName }} repo folder
131+
env:
132+
MSBUILDUSESERVER: 1
133+
DOTNET_CLI_USE_MSBUILD_SERVER: 1

eng/pipelines/templates/jobs/sdk-build.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,8 @@ jobs:
104104
env:
105105
BuildConfig: $(buildConfiguration)
106106
TestFullMSBuild: ${{ parameters.testFullMSBuild }}
107+
MSBUILDUSESERVER: 1
108+
DOTNET_CLI_USE_MSBUILD_SERVER: 1
107109

108110
- powershell: build/RunTestTemplateTests.ps1
109111
displayName: 🟣 Run Test Templates Tests
@@ -131,6 +133,8 @@ jobs:
131133
displayName: 🟣 Build
132134
env:
133135
BuildConfig: $(buildConfiguration)
136+
MSBUILDUSESERVER: 1
137+
DOTNET_CLI_USE_MSBUILD_SERVER: 1
134138
135139
############### TESTING ###############
136140
- ${{ if eq(parameters.runTests, true) }}:

eng/pipelines/templates/variables/sdk-defaults.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ variables:
44
linuxOsglibcProperties: /p:OSName=linux
55
helixTargetContainerPrefix: '@mcr.microsoft.com/dotnet-buildtools/prereqs:'
66

7+
# Use MSBuild server globally
8+
MSBUILDUSESERVER: 1
9+
DOTNET_CLI_USE_MSBUILD_SERVER: 1
10+
711
############### ARCADE ###############
812
# "Post-build signing" means that this build will NOT sign itself.
913
PostBuildSign: true

0 commit comments

Comments
 (0)