Skip to content

Commit 66093cf

Browse files
[main] Source code updates from dotnet/dotnet (#66632)
[main] Source code updates from dotnet/dotnet
1 parent 10ef6e5 commit 66093cf

12 files changed

Lines changed: 358 additions & 323 deletions

File tree

eng/Version.Details.props

Lines changed: 92 additions & 92 deletions
Large diffs are not rendered by default.

eng/Version.Details.xml

Lines changed: 185 additions & 185 deletions
Large diffs are not rendered by default.

eng/common/AGENTS.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# `eng/common`
2+
3+
Files under `eng/common` come from [Arcade](https://github.com/dotnet/arcade).
4+
Edits in `eng/common` will be overwritten by automation unless the changes are made directly in the Arcade repository.
5+
For more information, see the [Arcade documentation](https://github.com/dotnet/arcade/tree/main/Documentation).

eng/common/core-templates/job/onelocbuild.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ parameters:
2222
GitHubOrg: dotnet
2323
MirrorRepo: ''
2424
MirrorBranch: main
25+
xLocCustomPowerShellScript: ''
2526
condition: ''
2627
JobNameSuffix: ''
2728
is1ESPipeline: ''
@@ -97,6 +98,8 @@ jobs:
9798
gitHubOrganization: ${{ parameters.GitHubOrg }}
9899
mirrorRepo: ${{ parameters.MirrorRepo }}
99100
mirrorBranch: ${{ parameters.MirrorBranch }}
101+
${{ if ne(parameters.xLocCustomPowerShellScript, '') }}:
102+
xLocCustomPowerShellScript: ${{ parameters.xLocCustomPowerShellScript }}
100103
condition: ${{ parameters.condition }}
101104

102105
# Copy the locProject.json to the root of the Loc directory, then publish a pipeline artifact

eng/common/cross/toolchain.cmake

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -225,13 +225,19 @@ elseif(ILLUMOS)
225225
locate_toolchain_exec(g++ CMAKE_CXX_COMPILER)
226226
elseif(HAIKU)
227227
set(CMAKE_SYSROOT "${CROSS_ROOTFS}")
228-
set(CMAKE_PROGRAM_PATH "${CMAKE_PROGRAM_PATH};${CROSS_ROOTFS}/cross-tools-x86_64/bin")
229228
set(CMAKE_SYSTEM_PREFIX_PATH "${CROSS_ROOTFS}")
230229
set(CMAKE_C_STANDARD_LIBRARIES "${CMAKE_C_STANDARD_LIBRARIES} -lssp")
231230
set(CMAKE_CXX_STANDARD_LIBRARIES "${CMAKE_CXX_STANDARD_LIBRARIES} -lssp")
232231

233-
locate_toolchain_exec(gcc CMAKE_C_COMPILER)
234-
locate_toolchain_exec(g++ CMAKE_CXX_COMPILER)
232+
if ($ENV{CCC_CC} MATCHES ".*gcc.*")
233+
set(CMAKE_PROGRAM_PATH "${CMAKE_PROGRAM_PATH};${CROSS_ROOTFS}/cross-tools-x86_64/bin")
234+
locate_toolchain_exec(gcc CMAKE_C_COMPILER)
235+
locate_toolchain_exec(g++ CMAKE_CXX_COMPILER)
236+
else()
237+
set(CMAKE_C_COMPILER_EXTERNAL_TOOLCHAIN "${CROSS_ROOTFS}/cross-tools-x86_64")
238+
set(CMAKE_CXX_COMPILER_EXTERNAL_TOOLCHAIN "${CROSS_ROOTFS}/cross-tools-x86_64")
239+
set(CMAKE_ASM_COMPILER_EXTERNAL_TOOLCHAIN "${CROSS_ROOTFS}/cross-tools-x86_64")
240+
endif()
235241

236242
# let CMake set up the correct search paths
237243
include(Platform/Haiku)

eng/common/dotnet-install.ps1

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@ Param(
1010

1111
. $PSScriptRoot\tools.ps1
1212

13-
$dotnetRoot = Join-Path $RepoRoot '.dotnet'
13+
if (-not [string]::IsNullOrEmpty($env:DOTNET_GLOBAL_INSTALL_DIR)) {
14+
$dotnetRoot = $env:DOTNET_GLOBAL_INSTALL_DIR
15+
} else {
16+
$dotnetRoot = Join-Path $RepoRoot '.dotnet'
17+
}
1418

1519
$installdir = $dotnetRoot
1620
try {

eng/common/dotnet-install.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,11 @@ case $cpuname in
8080
;;
8181
esac
8282

83-
dotnetRoot="${repo_root}.dotnet"
83+
if [[ -n "${DOTNET_GLOBAL_INSTALL_DIR:-}" ]]; then
84+
dotnetRoot="$DOTNET_GLOBAL_INSTALL_DIR"
85+
else
86+
dotnetRoot="${repo_root}.dotnet"
87+
fi
8488
if [[ $architecture != "" ]] && [[ $architecture != $buildarch ]]; then
8589
dotnetRoot="$dotnetRoot/$architecture"
8690
fi

eng/common/tools.ps1

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,12 @@ function InitializeDotNetCli([bool]$install, [bool]$createSdkLocationFile) {
168168
$env:DOTNET_CLI_TELEMETRY_OPTOUT=1
169169
}
170170

171+
# Keep repo builds isolated from machine-installed SDK state and workload advertising.
172+
# This avoids preview SDK builds picking up mismatched workloads on CI images.
173+
$env:DOTNET_MULTILEVEL_LOOKUP = '0'
174+
$env:DOTNET_SKIP_FIRST_TIME_EXPERIENCE = '1'
175+
$env:DOTNET_CLI_WORKLOAD_UPDATE_NOTIFY_DISABLE = '1'
176+
171177
# Find the first path on %PATH% that contains the dotnet.exe
172178
if ($useInstalledDotNetCli -and (-not $globalJsonHasRuntimes) -and ($env:DOTNET_INSTALL_DIR -eq $null)) {
173179
$dotnetExecutable = GetExecutableFileName 'dotnet'
@@ -230,6 +236,9 @@ function InitializeDotNetCli([bool]$install, [bool]$createSdkLocationFile) {
230236
Write-PipelinePrependPath -Path $dotnetRoot
231237

232238
Write-PipelineSetVariable -Name 'DOTNET_NOLOGO' -Value '1'
239+
Write-PipelineSetVariable -Name 'DOTNET_MULTILEVEL_LOOKUP' -Value '0'
240+
Write-PipelineSetVariable -Name 'DOTNET_SKIP_FIRST_TIME_EXPERIENCE' -Value '1'
241+
Write-PipelineSetVariable -Name 'DOTNET_CLI_WORKLOAD_UPDATE_NOTIFY_DISABLE' -Value '1'
233242

234243
return $global:_DotNetInstallDir = $dotnetRoot
235244
}
@@ -619,11 +628,7 @@ function GetSdkTaskProject([string]$taskName) {
619628
if (Test-Path $proj) {
620629
return $proj
621630
}
622-
# TODO: Remove this fallback once all supported versions use the new layout.
623-
$legacyProj = Join-Path $toolsetDir "SdkTasks\$taskName.proj"
624-
if (Test-Path $legacyProj) {
625-
return $legacyProj
626-
}
631+
627632
throw "Unable to find $taskName.proj in toolset at: $toolsetDir"
628633
}
629634

@@ -699,23 +704,14 @@ function InitializeToolset() {
699704

700705
$packageDir = Join-Path $nugetCache (Join-Path 'microsoft.dotnet.arcade.sdk' $toolsetVersion)
701706
$packageToolsetDir = Join-Path $packageDir 'toolset'
702-
$packageToolsDir = Join-Path $packageDir 'tools'
703707

704-
# TODO: Remove the tools/ check once all supported versions have the toolset folder.
705-
if (!(Test-Path $packageToolsetDir) -and !(Test-Path $packageToolsDir)) {
708+
if (!(Test-Path $packageToolsetDir)) {
706709
Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "Arcade SDK package does not contain a toolset or tools folder: $packageDir"
707710
ExitWithExitCode 3
708711
}
709712

710713
New-Item -ItemType Directory -Path $toolsetToolsDir -Force | Out-Null
711-
712-
# Copy toolset if present at the package root (new layout), otherwise fall back to tools
713-
if (Test-Path $packageToolsetDir) {
714-
Copy-Item -Path "$packageToolsetDir\*" -Destination $toolsetToolsDir -Recurse -Force
715-
} else {
716-
# TODO: Remove this fallback once all supported versions have the toolset folder.
717-
Copy-Item -Path "$packageToolsDir\*" -Destination $toolsetToolsDir -Recurse -Force
718-
}
714+
Copy-Item -Path "$packageToolsetDir\*" -Destination $toolsetToolsDir -Recurse -Force
719715

720716
if (Test-Path $buildProjPath) {
721717
$toolsetBuildProj = $buildProjPath
@@ -842,6 +838,10 @@ function MSBuild-Core() {
842838

843839
$cmdArgs = "$($buildTool.Command) /m /nologo /clp:Summary /v:$verbosity /nr:$nodeReuse /p:ContinuousIntegrationBuild=$ci"
844840

841+
if ($ci -and $buildTool.Tool -eq 'dotnet') {
842+
$cmdArgs += ' /p:MSBuildEnableWorkloadResolver=false'
843+
}
844+
845845
# Add -mt flag for MSBuild multithreaded mode if enabled via environment variable
846846
if ($env:MSBUILD_MT_ENABLED -eq "1") {
847847
$cmdArgs += ' -mt'
@@ -952,6 +952,12 @@ Create-Directory $ToolsetDir
952952
Create-Directory $TempDir
953953
Create-Directory $LogDir
954954

955+
# Direct MSBuild crash diagnostics (MSB4166 failure.txt files) to a known location
956+
# under artifacts/log so they are captured as build artifacts in CI.
957+
if (-not $env:MSBUILDDEBUGPATH) {
958+
$env:MSBUILDDEBUGPATH = Join-Path $LogDir 'MsbuildDebugLogs'
959+
}
960+
955961
Write-PipelineSetVariable -Name 'Artifacts' -Value $ArtifactsDir
956962
Write-PipelineSetVariable -Name 'Artifacts.Toolset' -Value $ToolsetDir
957963
Write-PipelineSetVariable -Name 'Artifacts.Log' -Value $LogDir

eng/common/tools.sh

Lines changed: 25 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,12 @@ function InitializeDotNetCli {
126126
export DOTNET_CLI_TELEMETRY_OPTOUT=1
127127
fi
128128

129+
# Keep repo builds isolated from machine-installed SDK state and workload advertising.
130+
# This avoids preview SDK builds picking up mismatched workloads on CI images.
131+
export DOTNET_MULTILEVEL_LOOKUP=0
132+
export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
133+
export DOTNET_CLI_WORKLOAD_UPDATE_NOTIFY_DISABLE=1
134+
129135
# LTTNG is the logging infrastructure used by Core CLR. Need this variable set
130136
# so it doesn't output warnings to the console.
131137
export LTTNG_HOME="$HOME"
@@ -171,6 +177,9 @@ function InitializeDotNetCli {
171177
Write-PipelinePrependPath -path "$dotnet_root"
172178

173179
Write-PipelineSetVariable -name "DOTNET_NOLOGO" -value "1"
180+
Write-PipelineSetVariable -name "DOTNET_MULTILEVEL_LOOKUP" -value "0"
181+
Write-PipelineSetVariable -name "DOTNET_SKIP_FIRST_TIME_EXPERIENCE" -value "1"
182+
Write-PipelineSetVariable -name "DOTNET_CLI_WORKLOAD_UPDATE_NOTIFY_DISABLE" -value "1"
174183

175184
# return value
176185
_InitializeDotNetCli="$dotnet_root"
@@ -449,21 +458,13 @@ function InitializeToolset {
449458

450459
local package_dir="$_GetNuGetPackageCachePath/microsoft.dotnet.arcade.sdk/$toolset_version"
451460

452-
# TODO: Remove the tools/ check once all supported versions have the toolset folder.
453-
if [[ ! -d "$package_dir/toolset" && ! -d "$package_dir/tools" ]]; then
454-
Write-PipelineTelemetryError -category 'InitializeToolset' "Arcade SDK package does not contain a toolset or tools folder: $package_dir"
461+
if [[ ! -d "$package_dir/toolset" ]]; then
462+
Write-PipelineTelemetryError -category 'InitializeToolset' "Arcade SDK package does not contain a toolset folder: $package_dir"
455463
ExitWithExitCode 3
456464
fi
457465

458466
mkdir -p "$toolset_tools_dir"
459-
460-
# Copy toolset if present at the package root (new layout), otherwise fall back to tools
461-
if [[ -d "$package_dir/toolset" ]]; then
462-
cp -r "$package_dir/toolset/." "$toolset_tools_dir"
463-
else
464-
# TODO: Remove this fallback once all supported versions have the toolset folder.
465-
cp -r "$package_dir/tools/." "$toolset_tools_dir"
466-
fi
467+
cp -r "$package_dir/toolset/." "$toolset_tools_dir"
467468

468469
if [[ -a "$toolset_tools_dir/Build.proj" ]]; then
469470
toolset_build_proj="$toolset_tools_dir/Build.proj"
@@ -590,7 +591,12 @@ function MSBuild-Core {
590591
warnnotaserror_switch="/warnnotaserror:$warn_not_as_error /p:AdditionalWarningsNotAsErrors=$warn_not_as_error"
591592
fi
592593

593-
RunBuildTool "$_InitializeBuildToolCommand" /m /nologo /clp:Summary /v:$verbosity /nr:$node_reuse $warnaserror_switch $mt_switch $warnnotaserror_switch /p:TreatWarningsAsErrors=$warn_as_error /p:ContinuousIntegrationBuild=$ci "$@"
594+
local workload_resolver_switch=""
595+
if [[ "$ci" == true && -n "${_InitializeBuildToolCommand:-}" ]]; then
596+
workload_resolver_switch="/p:MSBuildEnableWorkloadResolver=false"
597+
fi
598+
599+
RunBuildTool "$_InitializeBuildToolCommand" /m /nologo /clp:Summary /v:$verbosity /nr:$node_reuse $warnaserror_switch $mt_switch $warnnotaserror_switch $workload_resolver_switch /p:TreatWarningsAsErrors=$warn_as_error /p:ContinuousIntegrationBuild=$ci "$@"
594600
}
595601

596602
function GetDarc {
@@ -615,12 +621,7 @@ function GetSdkTaskProject {
615621
echo "$proj"
616622
return
617623
fi
618-
# TODO: Remove this fallback once all supported versions use the new layout.
619-
local legacyProj="$toolsetDir/SdkTasks/$taskName.proj"
620-
if [[ -a "$legacyProj" ]]; then
621-
echo "$legacyProj"
622-
return
623-
fi
624+
624625
Write-PipelineTelemetryError -category 'Build' "Unable to find $taskName.proj in toolset at: $toolsetDir"
625626
ExitWithExitCode 3
626627
}
@@ -660,6 +661,12 @@ mkdir -p "$toolset_dir"
660661
mkdir -p "$temp_dir"
661662
mkdir -p "$log_dir"
662663

664+
# Direct MSBuild crash diagnostics (MSB4166 failure.txt files) to a known location
665+
# under artifacts/log so they are captured as build artifacts in CI.
666+
if [[ -z "${MSBUILDDEBUGPATH:-}" ]]; then
667+
export MSBUILDDEBUGPATH="$log_dir/MsbuildDebugLogs"
668+
fi
669+
663670
Write-PipelineSetVariable -name "Artifacts" -value "$artifacts_dir"
664671
Write-PipelineSetVariable -name "Artifacts.Toolset" -value "$toolset_dir"
665672
Write-PipelineSetVariable -name "Artifacts.Log" -value "$log_dir"

global.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
22
"sdk": {
3-
"version": "11.0.100-preview.4.26210.111",
3+
"version": "11.0.100-preview.5.26227.104",
44
"paths": [
55
".dotnet",
66
"$host$"
77
],
88
"errorMessage": "The .NET SDK could not be found, run ./restore.cmd or ./restore.sh first."
99
},
1010
"tools": {
11-
"dotnet": "11.0.100-preview.4.26210.111",
11+
"dotnet": "11.0.100-preview.5.26227.104",
1212
"runtimes": {
1313
"dotnet/x86": [
1414
"$(MicrosoftInternalRuntimeAspNetCoreTransportVersion)"
@@ -22,9 +22,9 @@
2222
"jdk": "latest"
2323
},
2424
"msbuild-sdks": {
25-
"Microsoft.DotNet.Arcade.Sdk": "11.0.0-beta.26256.105",
26-
"Microsoft.DotNet.Helix.Sdk": "11.0.0-beta.26256.105",
27-
"Microsoft.DotNet.SharedFramework.Sdk": "11.0.0-beta.26256.105",
25+
"Microsoft.DotNet.Arcade.Sdk": "11.0.0-beta.26261.101",
26+
"Microsoft.DotNet.Helix.Sdk": "11.0.0-beta.26261.101",
27+
"Microsoft.DotNet.SharedFramework.Sdk": "11.0.0-beta.26261.101",
2828
"Microsoft.Build.NoTargets": "3.7.0",
2929
"Microsoft.Build.Traversal": "3.4.0",
3030
"Microsoft.WixToolset.Sdk": "6.0.3-dotnet.4"

0 commit comments

Comments
 (0)