From 9b2e72feed5810c1db75b3da6c57577fbf82c294 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Thu, 30 Jul 2026 02:05:45 +0000 Subject: [PATCH 1/9] Backflow from https://github.com/dotnet/dotnet / 813f634 build 324908 Diff: https://github.com/dotnet/dotnet/compare/3dc10d7035d97e4a50afc9a1be854b9c43f5e9a1..813f634ceb016018f5acc9bd3c2b16e17dff4686 From: https://github.com/dotnet/dotnet/commit/3dc10d7035d97e4a50afc9a1be854b9c43f5e9a1 To: https://github.com/dotnet/dotnet/commit/813f634ceb016018f5acc9bd3c2b16e17dff4686 [[ commit created by automation ]] --- Directory.Build.props | 11 +--- eng/RuntimeIdentifier.props | 4 -- eng/Signing.props | 10 ++- eng/Subsets.props | 9 +-- eng/Versions.props | 5 +- eng/build.ps1 | 10 ++- .../common/evaluate-default-paths.yml | 3 - eng/pipelines/common/xplat-setup.yml | 1 - src/coreclr/.nuget/coreclr-packages.proj | 2 +- .../ILCompiler.ReadyToRun.Tests.csproj | 2 +- .../tools/aot/crossgen2/crossgen2.csproj | 2 +- .../Directory.Build.props | 1 + .../Directory.Build.targets | 31 +++++++++ .../Microsoft.NETCore.App.Host.sfxproj | 34 ++++++++++ .../pkg/sfx/installers/dnx-postinst.sh | 32 ++++++++++ .../pkg/sfx/installers/dnx-postremove.sh | 24 +++++++ src/installer/pkg/sfx/installers/dnx.cmd | 23 +++++++ .../pkg/sfx/installers/dotnet-host.proj | 64 ++++++++++++++++++- src/installer/pkg/sfx/installers/host.wxs | 6 ++ src/installer/pkg/sfx/installers/triggers | 10 +++ 20 files changed, 253 insertions(+), 31 deletions(-) create mode 100644 src/installer/pkg/sfx/installers/dnx-postinst.sh create mode 100644 src/installer/pkg/sfx/installers/dnx-postremove.sh create mode 100644 src/installer/pkg/sfx/installers/dnx.cmd create mode 100644 src/installer/pkg/sfx/installers/triggers diff --git a/Directory.Build.props b/Directory.Build.props index dcb5729d012d2c..e10a9be6011df7 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -129,7 +129,6 @@ $([MSBuild]::NormalizeDirectory('$(MSBuildThisFileDirectory)', 'src', 'coreclr')) $([MSBuild]::NormalizeDirectory('$(MSBuildThisFileDirectory)', 'src', 'mono')) $([MSBuild]::NormalizeDirectory('$(MSBuildThisFileDirectory)', 'src', 'installer')) - $([MSBuild]::NormalizeDirectory('$(MSBuildThisFileDirectory)', 'src', 'workloads')) $([MSBuild]::NormalizeDirectory('$(MSBuildThisFileDirectory)', 'src', 'tools')) $([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'src', 'native')) $([MSBuild]::NormalizeDirectory('$(MSBuildThisFileDirectory)', 'src', 'tasks')) @@ -220,10 +219,6 @@ false false - - true true @@ -250,10 +245,10 @@ $(TargetFramework.EndsWith('-android')) or $(TargetFramework.EndsWith('-ios')) or $(TargetFramework.EndsWith('-tvos')) or $(TargetFramework.EndsWith('-maccatalyst')))">false - - <_DisableCheckForUnsupportedMonoMobileRuntime Condition="'$(TargetOS)' == 'browser' or '$(TargetOS)' == 'wasi'">true + <_DisableCheckForUnsupportedMonoMobileRuntime Condition="'$(TargetOS)' == 'browser' or '$(TargetOS)' == 'wasi' or '$(CoreCLRSupported)' != 'true'">true @@ -300,8 +295,6 @@ strict;nullablePublicOnly true - - $(WarningsNotAsErrors);NU1901;NU1902;NU1903;NU1904 $(NoWarn);CS8500;CS8969 diff --git a/eng/RuntimeIdentifier.props b/eng/RuntimeIdentifier.props index e3ff389b1d6cdb..a3c396d8e6b6c7 100644 --- a/eng/RuntimeIdentifier.props +++ b/eng/RuntimeIdentifier.props @@ -20,10 +20,6 @@ linux-musl linux-bionic - - win - $(PortableOS)-$(TargetArchitecture) diff --git a/eng/Signing.props b/eng/Signing.props index c3fd63545484ff..0cff4e67489b13 100644 --- a/eng/Signing.props +++ b/eng/Signing.props @@ -31,6 +31,8 @@ + + - + + diff --git a/eng/Subsets.props b/eng/Subsets.props index df01e19e37c3e7..337bca6fa63caf 100644 --- a/eng/Subsets.props +++ b/eng/Subsets.props @@ -170,7 +170,7 @@ clr.nativeprereqs+clr.iltools+clr.runtime+clr.native+clr.aot+clr.nativeaotlibs+clr.nativeaotruntime+clr.crossarchtools $(AllSubsetsExpansion)+clr.paltests+clr.paltestlist+clr.hosts+clr.jit+clr.alljits+clr.alljitscommunity+clr.spmi+clr.corelib+clr.nativecorelib+clr.tools+clr.toolstests+clr.packages $(AllSubsetsExpansion)+linuxdac+alpinedac - $(AllSubsetsExpansion)+mono.runtime+provision.emsdk+mono.aotcross+mono.corelib+mono.manifests+mono.packages+mono.tools+mono.wasmruntime+mono.wasiruntime+mono.wasmworkload+mono.mscordbi+mono.workloads + $(AllSubsetsExpansion)+mono.runtime+provision.emsdk+mono.aotcross+mono.corelib+mono.manifests+mono.packages+mono.tools+mono.wasmruntime+mono.wasiruntime+mono.wasmworkload+mono.mscordbi $(AllSubsetsExpansion)+tools.illink+tools.cdac+tools.illinktests+tools.cdactests+tools.cdacdumptests $(AllSubsetsExpansion)+host.native+host.pkg+host.tools+host.pretest+host.tests $(AllSubsetsExpansion)+libs.native+libs.sfx+libs.oob+libs.pretest+libs.tests @@ -252,7 +252,6 @@ - @@ -383,7 +382,9 @@ The cross tools are used as part of the build process with the downloaded build tools, so we need to build them for the host architecture and build them as unsanitized binaries. --> - <_BuildAnyCrossArch Condition="('$(CrossBuild)' == 'true' or '$(BuildArchitecture)' != '$(TargetArchitecture)' or '$(HostOS)' != '$(TargetOS)' or '$(EnableNativeSanitizers)' != '')">true + + <_BuildAnyCrossArch Condition="('$(CrossBuild)' == 'true' or '$(BuildArchitecture)' != '$(TargetArchitecture)' or '$(HostOS)' != '$(TargetOS)' or '$(TargetsLinuxBionic)' == 'true' or '$(EnableNativeSanitizers)' != '')">true <_BuildCrossComponents Condition="$(_subset.Contains('+clr.crossarchtools+'))">true <_BuildCrossComponents Condition="'$(ClrRuntimeBuildSubsets)' != '' and ('$(PrimaryRuntimeFlavor)' == 'CoreCLR' or '$(TargetsMobile)' == 'true')">true <_CrossBitwidthBuild Condition="'$(BuildArchitecture)' == 'x64' and ('$(TargetArchitecture)' == 'x86' or '$(TargetArchitecture)' == 'arm')">true @@ -709,7 +710,7 @@ <_BuildCoreCLRRuntimePack Condition="'$(RuntimeFlavor)' == 'CoreCLR' and '$(CoreCLRSupported)' == 'true'">true <_BuildMonoRuntimePack Condition="'$(RuntimeFlavor)' == 'Mono' and '$(MonoSupported)' == 'true'">true <_BuildHostPack Condition="'$(RuntimeFlavor)' == '$(PrimaryRuntimeFlavor)' and '$(TargetsMobile)' != 'true'">true - <_BuildCdacPack Condition="'$(_CDacToolsBuilt)' == 'true' and '$(RuntimeFlavor)' == 'CoreCLR' and '$(TargetsMobile)' != 'true' and ('$(TargetOS)' == 'windows' or '$(TargetOS)' == 'osx' or '$(TargetOS)' == 'linux')">true + <_BuildCdacPack Condition="'$(_CDacToolsBuilt)' == 'true' and '$(RuntimeFlavor)' == 'CoreCLR' and '$(TargetsMobile)' != 'true' and '$(TargetsLinuxBionic)' != 'true' and ('$(TargetOS)' == 'windows' or '$(TargetOS)' == 'osx' or '$(TargetOS)' == 'linux')">true <_BuildBundle Condition="'$(RuntimeFlavor)' == '$(PrimaryRuntimeFlavor)' and '$(TargetsMobile)' != 'true'">true diff --git a/eng/Versions.props b/eng/Versions.props index 0b58815cc8502a..4727d1ebfd8c30 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -14,8 +14,8 @@ 8.0.$([MSBuild]::Add($([System.Version]::Parse('$(PackageVersionNet9)').Build),11)) 7.0.20 6.0.36 - preview - 7 + rc + 1 false release @@ -173,7 +173,6 @@ 6.0.2 - 1.1.87-gba258badda 1.0.0-v3.14.0.5722 3.1.7 diff --git a/eng/build.ps1 b/eng/build.ps1 index e01d1b9ecdcaee..1b29645ccba476 100644 --- a/eng/build.ps1 +++ b/eng/build.ps1 @@ -361,7 +361,15 @@ foreach ($argument in $PSBoundParameters.Keys) "framework" { $arguments += " /p:BuildTargetFramework=$($PSBoundParameters[$argument].ToLowerInvariant())" } "os" { $arguments += " /p:TargetOS=$($PSBoundParameters[$argument])" } "pack" { $arguments += " -pack /p:BuildAllConfigurations=true" } - "properties" { $arguments += " " + $properties } + "properties" { + # These arguments are later passed to Invoke-Expression, which re-parses the + # string as PowerShell. Wrap any value containing a ';' in quotes so it isn't + # interpreted as a statement separator (e.g. '-warnnotaserror NU1901;NU1902;NU1903'). + $quotedProperties = $properties | ForEach-Object { + if ($_ -match ';' -and $_ -notmatch '^["'']') { '"' + $_ + '"' } else { $_ } + } + $arguments += " " + ($quotedProperties -join ' ') + } "verbosity" { $arguments += " -$argument " + $($PSBoundParameters[$argument]) } "cmakeargs" { $arguments += " /p:CMakeArgs=`"$($PSBoundParameters[$argument])`"" } # The -ninja switch is a no-op since Ninja is the default generator on Windows. diff --git a/eng/pipelines/common/evaluate-default-paths.yml b/eng/pipelines/common/evaluate-default-paths.yml index c9d31d735ab45a..94c75642341b46 100644 --- a/eng/pipelines/common/evaluate-default-paths.yml +++ b/eng/pipelines/common/evaluate-default-paths.yml @@ -81,15 +81,12 @@ parameters: eng/testing/performance/* ] - # src/workloads is only used in runtime-official builds - # where evaluate-paths is not used _always_exclude: [ eng/pipelines/common/evaluate-default-paths.yml '*.md' LICENSE.TXT PATENTS.TXT THIRD-PARTY-NOTICES.TXT - src/workloads/* src/mono/wasm/sln/* ] diff --git a/eng/pipelines/common/xplat-setup.yml b/eng/pipelines/common/xplat-setup.yml index 68c0c0d9aa6b36..108931d07ce5fa 100644 --- a/eng/pipelines/common/xplat-setup.yml +++ b/eng/pipelines/common/xplat-setup.yml @@ -119,7 +119,6 @@ jobs: - name: wasmDarcDependenciesChanged value: $[ or( eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['DarcDependenciesChanged.Microsoft_NET_Workload_Emscripten_Current_Manifest-11_0_100_Transport'], true), - eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['DarcDependenciesChanged.Microsoft_DotNet_Build_Tasks_Workloads'], true), eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['DarcDependenciesChanged.System_Runtime_TimeZoneData'], true), eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['DarcDependenciesChanged.Microsoft_Net_Compilers_Toolset'], true), eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['DarcDependenciesChanged.Microsoft_CodeAnalysis'], true), diff --git a/src/coreclr/.nuget/coreclr-packages.proj b/src/coreclr/.nuget/coreclr-packages.proj index 587ddf302627d0..b6b91f217ebe45 100644 --- a/src/coreclr/.nuget/coreclr-packages.proj +++ b/src/coreclr/.nuget/coreclr-packages.proj @@ -7,7 +7,7 @@ - + diff --git a/src/coreclr/tools/aot/ILCompiler.ReadyToRun.Tests/ILCompiler.ReadyToRun.Tests.csproj b/src/coreclr/tools/aot/ILCompiler.ReadyToRun.Tests/ILCompiler.ReadyToRun.Tests.csproj index 63688330c5bc2e..9969de865e5fe9 100644 --- a/src/coreclr/tools/aot/ILCompiler.ReadyToRun.Tests/ILCompiler.ReadyToRun.Tests.csproj +++ b/src/coreclr/tools/aot/ILCompiler.ReadyToRun.Tests/ILCompiler.ReadyToRun.Tests.csproj @@ -51,7 +51,7 @@ Hooks into ResolveProjectReferences so it fires for `dotnet build` (and CI's `build.sh -test`, which builds before testing). `dotnet build /t:test` alone won't trigger it. --> - <_BuildJitsCrossArch Condition="'$(CrossBuild)' == 'true' or '$(BuildArchitecture)' != '$(TargetArchitecture)' or '$(HostOS)' != '$(TargetOS)' or '$(EnableNativeSanitizers)' != ''">true + <_BuildJitsCrossArch Condition="'$(CrossBuild)' == 'true' or '$(BuildArchitecture)' != '$(TargetArchitecture)' or '$(HostOS)' != '$(TargetOS)' or '$(TargetsLinuxBionic)' == 'true' or '$(EnableNativeSanitizers)' != ''">true <_BuildJitsProperties>ClrAllJitsSubset=true;ClrWasmJitSubset=true;Configuration=$(CoreCLRConfiguration) <_BuildJitsProperties Condition="!$([MSBuild]::IsOsPlatform(Windows))">$(_BuildJitsProperties);Ninja=true <_BuildJitsProperties Condition="'$(_BuildJitsCrossArch)' == 'true'">$(_BuildJitsProperties);HostArchitecture=$(BuildArchitecture);HostCrossOS=$(HostOS);CrossBuild=false;BuildSubdirectory=$(BuildArchitecture);CMakeArgs=$(CMakeArgs) -DCLR_CROSS_COMPONENTS_BUILD=1;PgoInstrument=false;NoPgoOptimize=true diff --git a/src/coreclr/tools/aot/crossgen2/crossgen2.csproj b/src/coreclr/tools/aot/crossgen2/crossgen2.csproj index 62d2448414f63d..e9805b7a7855f7 100644 --- a/src/coreclr/tools/aot/crossgen2/crossgen2.csproj +++ b/src/coreclr/tools/aot/crossgen2/crossgen2.csproj @@ -1,6 +1,6 @@ - $(BuildArchitecture) + $(BuildArchitecture) $(RuntimeBinDir)/crossgen2 diff --git a/src/installer/pkg/sfx/Microsoft.NETCore.App/Directory.Build.props b/src/installer/pkg/sfx/Microsoft.NETCore.App/Directory.Build.props index 3720e00b56f0c7..981865948070fd 100644 --- a/src/installer/pkg/sfx/Microsoft.NETCore.App/Directory.Build.props +++ b/src/installer/pkg/sfx/Microsoft.NETCore.App/Directory.Build.props @@ -343,6 +343,7 @@ + diff --git a/src/installer/pkg/sfx/Microsoft.NETCore.App/Directory.Build.targets b/src/installer/pkg/sfx/Microsoft.NETCore.App/Directory.Build.targets index 8230c38e50cdf4..e3ba28bfc764e9 100644 --- a/src/installer/pkg/sfx/Microsoft.NETCore.App/Directory.Build.targets +++ b/src/installer/pkg/sfx/Microsoft.NETCore.App/Directory.Build.targets @@ -15,6 +15,37 @@ + + + + <_JsCatalogOutputPath>$(IntermediateOutputPath)runtime-js.cat + + + + <_JsCatalogFile Include="@(FilesToPackage)" Condition="'%(Extension)' == '.js'" /> + + + + + + + + + + + + + diff --git a/src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Host.sfxproj b/src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Host.sfxproj index 0ccf4213e29fac..15e76b0d539f0c 100644 --- a/src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Host.sfxproj +++ b/src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Host.sfxproj @@ -88,4 +88,38 @@ + + + + + <_AppHostCatalogOutputPath>$(IntermediateOutputPath)apphost-templates.cat + + + + <_AppHostTemplateFile Include="$(DotNetHostBinDir)apphost.exe" Condition="Exists('$(DotNetHostBinDir)apphost.exe')" /> + <_AppHostTemplateFile Include="$(DotNetHostBinDir)singlefilehost.exe" Condition="Exists('$(DotNetHostBinDir)singlefilehost.exe')" /> + <_AppHostTemplateFile Include="$(DotNetHostBinDir)comhost.dll" Condition="Exists('$(DotNetHostBinDir)comhost.dll')" /> + + + + + + + + + + + + diff --git a/src/installer/pkg/sfx/installers/dnx-postinst.sh b/src/installer/pkg/sfx/installers/dnx-postinst.sh new file mode 100644 index 00000000000000..d5cde063d2cfc3 --- /dev/null +++ b/src/installer/pkg/sfx/installers/dnx-postinst.sh @@ -0,0 +1,32 @@ +#!/bin/sh +set -e + +# Idempotently restore the robust dnx dispatcher shipped by dotnet-host and ensure the +# public /usr/bin/dnx entry point is a symlink to it. +# +# This is shared by: +# - the Debian 'postinst' maintainer script (invoked on configure and on trigger activation), +# - the RPM '%post' scriptlet (invoked on install and upgrade), and +# - the RPM transaction file trigger that fires when an SDK changes its install tree. +# +# Background (https://github.com/dotnet/sdk/issues/55303): released dotnet-sdk-10.0 packages +# shipped /usr/bin/dnx as a regular file whose only content was the text "../share/dotnet/dnx" +# (so direct execution failed), and an older dispatcher at /usr/share/dotnet/dnx. +# +# /usr/share/dotnet/dnx cannot also be the repair source: it is one of the public paths that an +# SDK install or reinstall can overwrite before this script runs. The host package therefore keeps +# its robust dispatcher at /usr/share/dotnet/dnx.dispatcher, a private path that SDK packages do not +# own. That uncontested source survives the SDK transaction and lets this script deterministically +# restore both public entries afterward. + +dispatcher_source="/usr/share/dotnet/dnx.dispatcher" +dispatcher_target="/usr/share/dotnet/dnx" +public_entry="/usr/bin/dnx" + +if [ ! -f "$dispatcher_source" ]; then + echo "dotnet-host cannot repair dnx because $dispatcher_source is missing." >&2 + exit 1 +fi + +install -m 0755 "$dispatcher_source" "$dispatcher_target" +ln -sfn ../share/dotnet/dnx "$public_entry" diff --git a/src/installer/pkg/sfx/installers/dnx-postremove.sh b/src/installer/pkg/sfx/installers/dnx-postremove.sh new file mode 100644 index 00000000000000..24d7f60190623c --- /dev/null +++ b/src/installer/pkg/sfx/installers/dnx-postremove.sh @@ -0,0 +1,24 @@ +#!/bin/sh +set -e + +# Remove the public dnx entry points that dotnet-host generates and repairs, but only on the +# final removal of the host. +# +# This is shared by: +# - the Debian 'postrm' maintainer script (invoked with 'remove' or 'purge'), and +# - the RPM '%postun' scriptlet (invoked with the number of remaining package instances, +# which is 0 on the final erase and >=1 during an upgrade). +# +# For RPM the public /usr/share/dotnet/dnx and /usr/bin/dnx paths are owned as "ghost" files +# (not shipped in the payload) and are materialized by the post-install/file-trigger repair, +# so rpm itself will not remove them; this scriptlet must. For Debian the same paths are +# shipped normally and dpkg removes them, so these calls are a harmless, idempotent backstop. +# +# dotnet-host is a hard dependency of the SDK packages, so it can only be removed once no SDK +# remains; cleaning these paths here therefore does not disturb a still-installed SDK. +case "$1" in + 0|remove|purge) + rm -f /usr/bin/dnx + rm -f /usr/share/dotnet/dnx + ;; +esac diff --git a/src/installer/pkg/sfx/installers/dnx.cmd b/src/installer/pkg/sfx/installers/dnx.cmd new file mode 100644 index 00000000000000..94156380edde6e --- /dev/null +++ b/src/installer/pkg/sfx/installers/dnx.cmd @@ -0,0 +1,23 @@ +:: Licensed to the .NET Foundation under one or more agreements. +:: The .NET Foundation licenses this file to you under the MIT license. + +@echo off +setlocal enableextensions + +set "DOTNET=%~dp0dotnet.exe" + +set "SDK_VERSION=" +for /f "tokens=1" %%i in ('"%DOTNET%" --list-sdks') do ( + set "SDK_VERSION=%%i" +) + +if not defined SDK_VERSION ( + echo Error: dnx requires a .NET SDK to be installed, but none was found. 1>&2 + exit /b 1 +) + +set "SDK_PATH=%~dp0sdk\%SDK_VERSION%\dotnet.dll" + +"%DOTNET%" exec "%SDK_PATH%" dnx %* + +endlocal & exit /b %ERRORLEVEL% diff --git a/src/installer/pkg/sfx/installers/dotnet-host.proj b/src/installer/pkg/sfx/installers/dotnet-host.proj index b0317a8f9977c9..44768941c0b5e3 100644 --- a/src/installer/pkg/sfx/installers/dotnet-host.proj +++ b/src/installer/pkg/sfx/installers/dotnet-host.proj @@ -51,15 +51,36 @@ + + + + DestinationFiles="%(FilesToPublish.Destination)" + Condition="'%(FilesToPublish.InstallerOnly)' != 'true'" /> + + + + @@ -83,6 +104,47 @@ + + + + + + + + + + + + + + + + + + <_MacOSIntermediatesPath>$(IntermediateOutputPath)macos/ diff --git a/src/installer/pkg/sfx/installers/host.wxs b/src/installer/pkg/sfx/installers/host.wxs index 066cf4dfbd0186..3e342f91956da6 100644 --- a/src/installer/pkg/sfx/installers/host.wxs +++ b/src/installer/pkg/sfx/installers/host.wxs @@ -25,6 +25,12 @@ + + + + + + diff --git a/src/installer/pkg/sfx/installers/triggers b/src/installer/pkg/sfx/installers/triggers new file mode 100644 index 00000000000000..a3485b7ee49ca9 --- /dev/null +++ b/src/installer/pkg/sfx/installers/triggers @@ -0,0 +1,10 @@ +# dpkg triggers for dotnet-host (https://github.com/dotnet/sdk/issues/55303). +# +# Re-run the postinst repair whenever any package installs, upgrades, or removes files under +# these paths. The host package's bounded Replaces relationship prevents an in-range +# dotnet-sdk-10.0 package from overwriting the host-owned entries in either install order; +# this trigger is a backstop that restores them after any transaction that does modify the +# paths. 'noawait' avoids introducing processing-order constraints between the host and the +# SDK within a single dpkg transaction. +interest-noawait /usr/share/dotnet/dnx +interest-noawait /usr/bin/dnx From 8d3cba7060b04475aac1a7ba969a881bc767d357 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Thu, 30 Jul 2026 02:05:55 +0000 Subject: [PATCH 2/9] Update dependencies from build 324908 Updated Dependencies: Microsoft.CodeAnalysis, Microsoft.CodeAnalysis.Analyzers, Microsoft.CodeAnalysis.BannedApiAnalyzers, Microsoft.CodeAnalysis.CSharp, Microsoft.Net.Compilers.Toolset (Version 5.10.0-1.26365.101 -> 5.10.0-1.26379.102) Microsoft.CodeAnalysis.NetAnalyzers, Microsoft.DotNet.ApiCompat.Task, Microsoft.NET.Workload.Emscripten.Current.Manifest-11.0.100.Transport (Version 11.0.100-preview.7.26365.101 -> 11.0.100-rc.1.26379.102) Microsoft.DotNet.Arcade.Sdk, Microsoft.DotNet.Build.Tasks.Archives, Microsoft.DotNet.Build.Tasks.Feed, Microsoft.DotNet.Build.Tasks.Installers, Microsoft.DotNet.Build.Tasks.Packaging, Microsoft.DotNet.Build.Tasks.TargetFramework, Microsoft.DotNet.Build.Tasks.Templating, Microsoft.DotNet.CodeAnalysis, Microsoft.DotNet.GenAPI, Microsoft.DotNet.GenFacades, Microsoft.DotNet.Helix.Sdk, Microsoft.DotNet.PackageTesting, Microsoft.DotNet.RemoteExecutor, Microsoft.DotNet.SharedFramework.Sdk, Microsoft.DotNet.XliffTasks, Microsoft.DotNet.XUnitExtensions (Version 11.0.0-beta.26365.101 -> 11.0.0-beta.26379.102) runtime.linux-arm64.Microsoft.NETCore.Runtime.JIT.Tools, runtime.linux-x64.Microsoft.NETCore.Runtime.JIT.Tools, runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.JIT.Tools, runtime.linux-musl-x64.Microsoft.NETCore.Runtime.JIT.Tools, runtime.win-arm64.Microsoft.NETCore.Runtime.JIT.Tools, runtime.win-x64.Microsoft.NETCore.Runtime.JIT.Tools, runtime.osx-arm64.Microsoft.NETCore.Runtime.JIT.Tools, runtime.osx-x64.Microsoft.NETCore.Runtime.JIT.Tools, runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Libclang, runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk, runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools, runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Libclang, runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk, runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools, runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Libclang, runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk, runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools, runtime.linux-musl-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Libclang, runtime.linux-musl-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk, runtime.linux-musl-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools, runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Libclang, runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk, runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools, runtime.osx-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Libclang, runtime.osx-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk, runtime.osx-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools, runtime.osx-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Libclang, runtime.osx-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk, runtime.osx-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools (Version 23.1.0-alpha.1.26357.1 -> 23.1.0-alpha.1.26370.1) Microsoft.DotNet.Cecil (Version 0.11.5-preview.26365.101 -> 0.11.5-preview.26379.102) Microsoft.DotNet.XUnitConsoleRunner (Version 2.9.3-beta.26365.101 -> 2.9.3-beta.26379.102) Microsoft.NET.Sdk.IL, Microsoft.NETCore.App.Ref, Microsoft.NETCore.ILAsm, runtime.native.System.IO.Ports, System.Reflection.Metadata, System.Reflection.MetadataLoadContext, System.Text.Json (Version 11.0.0-preview.7.26365.101 -> 11.0.0-rc.1.26379.102) NuGet.Frameworks, NuGet.Packaging, NuGet.ProjectModel, NuGet.Versioning (Version 7.10.0-rc.36601 -> 7.10.0-rc.38002) System.CommandLine (Version 3.0.0-preview.7.26365.101 -> 3.0.0-rc.1.26379.102) runtime.linux-arm64.Microsoft.NETCore.Runtime.Wasm.Node.Transport, runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.Wasm.Node.Transport, runtime.linux-x64.Microsoft.NETCore.Runtime.Wasm.Node.Transport, runtime.linux-musl-x64.Microsoft.NETCore.Runtime.Wasm.Node.Transport, runtime.osx-arm64.Microsoft.NETCore.Runtime.Wasm.Node.Transport, runtime.osx-x64.Microsoft.NETCore.Runtime.Wasm.Node.Transport, runtime.win-arm64.Microsoft.NETCore.Runtime.Wasm.Node.Transport, runtime.win-x64.Microsoft.NETCore.Runtime.Wasm.Node.Transport (Version 11.0.0-alpha.1.26353.1 -> 11.0.0-alpha.1.26372.1) Added Dependencies: Microsoft.DotNet.Build.Tasks.FileCatalog (Version 11.0.0-beta.26379.102) Removed Dependencies: Microsoft.DotNet.Build.Tasks.Workloads (Version 11.0.0-beta.26365.101) [[ commit created by automation ]] --- eng/Version.Details.props | 154 ++++----- eng/Version.Details.xml | 310 +++++++++--------- eng/common/build.ps1 | 2 + eng/common/build.sh | 11 + .../core-templates/job/helix-job-monitor.yml | 20 +- eng/common/core-templates/job/onelocbuild.yml | 20 +- .../core-templates/steps/publish-logs.yml | 1 - eng/common/cross/build-rootfs.sh | 43 ++- eng/common/cross/toolchain.cmake | 2 + eng/common/native/init-os-and-arch.sh | 6 +- eng/common/sdk-task.ps1 | 17 +- eng/common/sdk-task.sh | 22 +- eng/common/tools.ps1 | 50 ++- eng/common/tools.sh | 62 +++- global.json | 12 +- 15 files changed, 451 insertions(+), 281 deletions(-) diff --git a/eng/Version.Details.props b/eng/Version.Details.props index 0fd895e2d1d3b7..22c991e6085f25 100644 --- a/eng/Version.Details.props +++ b/eng/Version.Details.props @@ -6,89 +6,89 @@ This file should be imported by eng/Versions.props - 5.10.0-1.26365.101 - 5.10.0-1.26365.101 - 5.10.0-1.26365.101 - 5.10.0-1.26365.101 - 11.0.100-preview.7.26365.101 - 11.0.100-preview.7.26365.101 - 11.0.0-beta.26365.101 - 11.0.0-beta.26365.101 - 11.0.0-beta.26365.101 - 11.0.0-beta.26365.101 - 11.0.0-beta.26365.101 - 11.0.0-beta.26365.101 - 11.0.0-beta.26365.101 - 11.0.0-beta.26365.101 - 0.11.5-preview.26365.101 - 11.0.0-beta.26365.101 - 11.0.0-beta.26365.101 - 11.0.0-beta.26365.101 - 11.0.0-beta.26365.101 - 11.0.0-beta.26365.101 - 11.0.0-beta.26365.101 - 11.0.0-beta.26365.101 - 11.0.0-beta.26365.101 + 5.10.0-1.26379.102 + 5.10.0-1.26379.102 + 5.10.0-1.26379.102 + 5.10.0-1.26379.102 + 11.0.100-rc.1.26379.102 + 11.0.100-rc.1.26379.102 + 11.0.0-beta.26379.102 + 11.0.0-beta.26379.102 + 11.0.0-beta.26379.102 + 11.0.0-beta.26379.102 + 11.0.0-beta.26379.102 + 11.0.0-beta.26379.102 + 11.0.0-beta.26379.102 + 11.0.0-beta.26379.102 + 0.11.5-preview.26379.102 + 11.0.0-beta.26379.102 + 11.0.0-beta.26379.102 + 11.0.0-beta.26379.102 + 11.0.0-beta.26379.102 + 11.0.0-beta.26379.102 + 11.0.0-beta.26379.102 + 11.0.0-beta.26379.102 + 11.0.0-beta.26379.102 3.2.2-beta.26257.113 - 2.9.3-beta.26365.101 - 11.0.0-beta.26365.101 - 5.10.0-1.26365.101 - 11.0.0-preview.7.26365.101 - 11.0.100-preview.7.26365.101 - 11.0.0-preview.7.26365.101 - 11.0.0-preview.7.26365.101 - 7.10.0-rc.36601 - 7.10.0-rc.36601 - 7.10.0-rc.36601 - 7.10.0-rc.36601 - 11.0.0-preview.7.26365.101 - 3.0.0-preview.7.26365.101 - 11.0.0-preview.7.26365.101 - 11.0.0-preview.7.26365.101 - 11.0.0-preview.7.26365.101 + 2.9.3-beta.26379.102 + 11.0.0-beta.26379.102 + 5.10.0-1.26379.102 + 11.0.0-rc.1.26379.102 + 11.0.100-rc.1.26379.102 + 11.0.0-rc.1.26379.102 + 11.0.0-rc.1.26379.102 + 7.10.0-rc.38002 + 7.10.0-rc.38002 + 7.10.0-rc.38002 + 7.10.0-rc.38002 + 11.0.0-rc.1.26379.102 + 3.0.0-rc.1.26379.102 + 11.0.0-rc.1.26379.102 + 11.0.0-rc.1.26379.102 + 11.0.0-rc.1.26379.102 11.0.0-alpha.0.26180.1 11.0.0-alpha.1.26364.1 - 23.1.0-alpha.1.26357.1 - 23.1.0-alpha.1.26357.1 - 23.1.0-alpha.1.26357.1 - 23.1.0-alpha.1.26357.1 - 23.1.0-alpha.1.26357.1 - 23.1.0-alpha.1.26357.1 - 23.1.0-alpha.1.26357.1 - 23.1.0-alpha.1.26357.1 - 23.1.0-alpha.1.26357.1 - 23.1.0-alpha.1.26357.1 - 23.1.0-alpha.1.26357.1 - 23.1.0-alpha.1.26357.1 - 23.1.0-alpha.1.26357.1 - 23.1.0-alpha.1.26357.1 - 23.1.0-alpha.1.26357.1 - 23.1.0-alpha.1.26357.1 - 23.1.0-alpha.1.26357.1 - 23.1.0-alpha.1.26357.1 - 23.1.0-alpha.1.26357.1 - 23.1.0-alpha.1.26357.1 - 23.1.0-alpha.1.26357.1 - 23.1.0-alpha.1.26357.1 - 23.1.0-alpha.1.26357.1 - 23.1.0-alpha.1.26357.1 - 23.1.0-alpha.1.26357.1 - 23.1.0-alpha.1.26357.1 - 23.1.0-alpha.1.26357.1 - 23.1.0-alpha.1.26357.1 - 23.1.0-alpha.1.26357.1 + 23.1.0-alpha.1.26370.1 + 23.1.0-alpha.1.26370.1 + 23.1.0-alpha.1.26370.1 + 23.1.0-alpha.1.26370.1 + 23.1.0-alpha.1.26370.1 + 23.1.0-alpha.1.26370.1 + 23.1.0-alpha.1.26370.1 + 23.1.0-alpha.1.26370.1 + 23.1.0-alpha.1.26370.1 + 23.1.0-alpha.1.26370.1 + 23.1.0-alpha.1.26370.1 + 23.1.0-alpha.1.26370.1 + 23.1.0-alpha.1.26370.1 + 23.1.0-alpha.1.26370.1 + 23.1.0-alpha.1.26370.1 + 23.1.0-alpha.1.26370.1 + 23.1.0-alpha.1.26370.1 + 23.1.0-alpha.1.26370.1 + 23.1.0-alpha.1.26370.1 + 23.1.0-alpha.1.26370.1 + 23.1.0-alpha.1.26370.1 + 23.1.0-alpha.1.26370.1 + 23.1.0-alpha.1.26370.1 + 23.1.0-alpha.1.26370.1 + 23.1.0-alpha.1.26370.1 + 23.1.0-alpha.1.26370.1 + 23.1.0-alpha.1.26370.1 + 23.1.0-alpha.1.26370.1 + 23.1.0-alpha.1.26370.1 - 11.0.0-alpha.1.26353.1 - 11.0.0-alpha.1.26353.1 - 11.0.0-alpha.1.26353.1 - 11.0.0-alpha.1.26353.1 - 11.0.0-alpha.1.26353.1 - 11.0.0-alpha.1.26353.1 - 11.0.0-alpha.1.26353.1 - 11.0.0-alpha.1.26353.1 + 11.0.0-alpha.1.26372.1 + 11.0.0-alpha.1.26372.1 + 11.0.0-alpha.1.26372.1 + 11.0.0-alpha.1.26372.1 + 11.0.0-alpha.1.26372.1 + 11.0.0-alpha.1.26372.1 + 11.0.0-alpha.1.26372.1 + 11.0.0-alpha.1.26372.1 1.0.0-prerelease.26318.1 1.0.0-prerelease.26318.1 @@ -130,11 +130,11 @@ This file should be imported by eng/Versions.props $(MicrosoftDotNetArcadeSdkPackageVersion) $(MicrosoftDotNetBuildTasksArchivesPackageVersion) $(MicrosoftDotNetBuildTasksFeedPackageVersion) + $(MicrosoftDotNetBuildTasksFileCatalogPackageVersion) $(MicrosoftDotNetBuildTasksInstallersPackageVersion) $(MicrosoftDotNetBuildTasksPackagingPackageVersion) $(MicrosoftDotNetBuildTasksTargetFrameworkPackageVersion) $(MicrosoftDotNetBuildTasksTemplatingPackageVersion) - $(MicrosoftDotNetBuildTasksWorkloadsPackageVersion) $(MicrosoftDotNetCecilPackageVersion) $(MicrosoftDotNetCodeAnalysisPackageVersion) $(MicrosoftDotNetGenAPIPackageVersion) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index db253a8650dc16..4f411d0ad9394f 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,127 +1,123 @@ - + https://github.com/dotnet/icu 6cfb6605cf78bc12164284ec6cc7afbafb52d64e - + https://github.com/dotnet/llvm-project - 04bf14b2fcb8eb30971d457dfc553b8af00352c4 + f4d1fd43c863e8b17c0f8d50536e23c4e84c3242 - + https://github.com/dotnet/llvm-project - 04bf14b2fcb8eb30971d457dfc553b8af00352c4 + f4d1fd43c863e8b17c0f8d50536e23c4e84c3242 - + https://github.com/dotnet/llvm-project - 04bf14b2fcb8eb30971d457dfc553b8af00352c4 + f4d1fd43c863e8b17c0f8d50536e23c4e84c3242 - + https://github.com/dotnet/llvm-project - 04bf14b2fcb8eb30971d457dfc553b8af00352c4 + f4d1fd43c863e8b17c0f8d50536e23c4e84c3242 - + https://github.com/dotnet/llvm-project - 04bf14b2fcb8eb30971d457dfc553b8af00352c4 + f4d1fd43c863e8b17c0f8d50536e23c4e84c3242 - + https://github.com/dotnet/llvm-project - 04bf14b2fcb8eb30971d457dfc553b8af00352c4 + f4d1fd43c863e8b17c0f8d50536e23c4e84c3242 - + https://github.com/dotnet/llvm-project - 04bf14b2fcb8eb30971d457dfc553b8af00352c4 + f4d1fd43c863e8b17c0f8d50536e23c4e84c3242 - + https://github.com/dotnet/llvm-project - 04bf14b2fcb8eb30971d457dfc553b8af00352c4 + f4d1fd43c863e8b17c0f8d50536e23c4e84c3242 - + https://github.com/dotnet/dotnet - cb8306a63c5cf24e9381108a3a9eb58907fd0f60 + 813f634ceb016018f5acc9bd3c2b16e17dff4686 - + https://github.com/dotnet/dotnet - cb8306a63c5cf24e9381108a3a9eb58907fd0f60 + 813f634ceb016018f5acc9bd3c2b16e17dff4686 - + https://github.com/dotnet/dotnet - cb8306a63c5cf24e9381108a3a9eb58907fd0f60 + 813f634ceb016018f5acc9bd3c2b16e17dff4686 - + https://github.com/dotnet/dotnet - cb8306a63c5cf24e9381108a3a9eb58907fd0f60 + 813f634ceb016018f5acc9bd3c2b16e17dff4686 - + https://github.com/dotnet/dotnet - cb8306a63c5cf24e9381108a3a9eb58907fd0f60 + 813f634ceb016018f5acc9bd3c2b16e17dff4686 - + https://github.com/dotnet/dotnet - cb8306a63c5cf24e9381108a3a9eb58907fd0f60 + 813f634ceb016018f5acc9bd3c2b16e17dff4686 - + https://github.com/dotnet/dotnet - cb8306a63c5cf24e9381108a3a9eb58907fd0f60 + 813f634ceb016018f5acc9bd3c2b16e17dff4686 - + https://github.com/dotnet/dotnet - cb8306a63c5cf24e9381108a3a9eb58907fd0f60 + 813f634ceb016018f5acc9bd3c2b16e17dff4686 https://github.com/dotnet/dotnet 0eae08ed2f094f44e0151e4815e7cdd1a334fcdf - + https://github.com/dotnet/dotnet - cb8306a63c5cf24e9381108a3a9eb58907fd0f60 + 813f634ceb016018f5acc9bd3c2b16e17dff4686 - + https://github.com/dotnet/dotnet - cb8306a63c5cf24e9381108a3a9eb58907fd0f60 + 813f634ceb016018f5acc9bd3c2b16e17dff4686 - + https://github.com/dotnet/dotnet - cb8306a63c5cf24e9381108a3a9eb58907fd0f60 + 813f634ceb016018f5acc9bd3c2b16e17dff4686 - + https://github.com/dotnet/dotnet - cb8306a63c5cf24e9381108a3a9eb58907fd0f60 + 813f634ceb016018f5acc9bd3c2b16e17dff4686 - + https://github.com/dotnet/dotnet - cb8306a63c5cf24e9381108a3a9eb58907fd0f60 + 813f634ceb016018f5acc9bd3c2b16e17dff4686 - + https://github.com/dotnet/dotnet - cb8306a63c5cf24e9381108a3a9eb58907fd0f60 + 813f634ceb016018f5acc9bd3c2b16e17dff4686 - + https://github.com/dotnet/dotnet - cb8306a63c5cf24e9381108a3a9eb58907fd0f60 + 813f634ceb016018f5acc9bd3c2b16e17dff4686 - + https://github.com/dotnet/dotnet - cb8306a63c5cf24e9381108a3a9eb58907fd0f60 + 813f634ceb016018f5acc9bd3c2b16e17dff4686 - + https://github.com/dotnet/dotnet - cb8306a63c5cf24e9381108a3a9eb58907fd0f60 + 813f634ceb016018f5acc9bd3c2b16e17dff4686 - + https://github.com/dotnet/dotnet - cb8306a63c5cf24e9381108a3a9eb58907fd0f60 + 813f634ceb016018f5acc9bd3c2b16e17dff4686 - + https://github.com/dotnet/dotnet - cb8306a63c5cf24e9381108a3a9eb58907fd0f60 - - - https://github.com/dotnet/dotnet - cb8306a63c5cf24e9381108a3a9eb58907fd0f60 + 813f634ceb016018f5acc9bd3c2b16e17dff4686 https://github.com/dotnet/runtime-assets @@ -175,117 +171,117 @@ https://github.com/dotnet/runtime-assets a4665cef9921714c936e13cbcc7121d2683a6604 - + https://github.com/dotnet/llvm-project - 04bf14b2fcb8eb30971d457dfc553b8af00352c4 + f4d1fd43c863e8b17c0f8d50536e23c4e84c3242 - + https://github.com/dotnet/llvm-project - 04bf14b2fcb8eb30971d457dfc553b8af00352c4 + f4d1fd43c863e8b17c0f8d50536e23c4e84c3242 - + https://github.com/dotnet/llvm-project - 04bf14b2fcb8eb30971d457dfc553b8af00352c4 + f4d1fd43c863e8b17c0f8d50536e23c4e84c3242 - + https://github.com/dotnet/llvm-project - 04bf14b2fcb8eb30971d457dfc553b8af00352c4 + f4d1fd43c863e8b17c0f8d50536e23c4e84c3242 - + https://github.com/dotnet/llvm-project - 04bf14b2fcb8eb30971d457dfc553b8af00352c4 + f4d1fd43c863e8b17c0f8d50536e23c4e84c3242 - + https://github.com/dotnet/llvm-project - 04bf14b2fcb8eb30971d457dfc553b8af00352c4 + f4d1fd43c863e8b17c0f8d50536e23c4e84c3242 - + https://github.com/dotnet/llvm-project - 04bf14b2fcb8eb30971d457dfc553b8af00352c4 + f4d1fd43c863e8b17c0f8d50536e23c4e84c3242 - + https://github.com/dotnet/llvm-project - 04bf14b2fcb8eb30971d457dfc553b8af00352c4 + f4d1fd43c863e8b17c0f8d50536e23c4e84c3242 - + https://github.com/dotnet/llvm-project - 04bf14b2fcb8eb30971d457dfc553b8af00352c4 + f4d1fd43c863e8b17c0f8d50536e23c4e84c3242 - + https://github.com/dotnet/llvm-project - 04bf14b2fcb8eb30971d457dfc553b8af00352c4 + f4d1fd43c863e8b17c0f8d50536e23c4e84c3242 - + https://github.com/dotnet/llvm-project - 04bf14b2fcb8eb30971d457dfc553b8af00352c4 + f4d1fd43c863e8b17c0f8d50536e23c4e84c3242 - + https://github.com/dotnet/llvm-project - 04bf14b2fcb8eb30971d457dfc553b8af00352c4 + f4d1fd43c863e8b17c0f8d50536e23c4e84c3242 - + https://github.com/dotnet/llvm-project - 04bf14b2fcb8eb30971d457dfc553b8af00352c4 + f4d1fd43c863e8b17c0f8d50536e23c4e84c3242 - + https://github.com/dotnet/llvm-project - 04bf14b2fcb8eb30971d457dfc553b8af00352c4 + f4d1fd43c863e8b17c0f8d50536e23c4e84c3242 - + https://github.com/dotnet/llvm-project - 04bf14b2fcb8eb30971d457dfc553b8af00352c4 + f4d1fd43c863e8b17c0f8d50536e23c4e84c3242 - + https://github.com/dotnet/llvm-project - 04bf14b2fcb8eb30971d457dfc553b8af00352c4 + f4d1fd43c863e8b17c0f8d50536e23c4e84c3242 - + https://github.com/dotnet/llvm-project - 04bf14b2fcb8eb30971d457dfc553b8af00352c4 + f4d1fd43c863e8b17c0f8d50536e23c4e84c3242 - + https://github.com/dotnet/llvm-project - 04bf14b2fcb8eb30971d457dfc553b8af00352c4 + f4d1fd43c863e8b17c0f8d50536e23c4e84c3242 - + https://github.com/dotnet/llvm-project - 04bf14b2fcb8eb30971d457dfc553b8af00352c4 + f4d1fd43c863e8b17c0f8d50536e23c4e84c3242 - + https://github.com/dotnet/llvm-project - 04bf14b2fcb8eb30971d457dfc553b8af00352c4 + f4d1fd43c863e8b17c0f8d50536e23c4e84c3242 - + https://github.com/dotnet/llvm-project - 04bf14b2fcb8eb30971d457dfc553b8af00352c4 + f4d1fd43c863e8b17c0f8d50536e23c4e84c3242 - + https://github.com/dotnet/dotnet - cb8306a63c5cf24e9381108a3a9eb58907fd0f60 + 813f634ceb016018f5acc9bd3c2b16e17dff4686 - + https://github.com/dotnet/dotnet - cb8306a63c5cf24e9381108a3a9eb58907fd0f60 + 813f634ceb016018f5acc9bd3c2b16e17dff4686 - + https://github.com/dotnet/dotnet - cb8306a63c5cf24e9381108a3a9eb58907fd0f60 + 813f634ceb016018f5acc9bd3c2b16e17dff4686 - + https://github.com/dotnet/dotnet - cb8306a63c5cf24e9381108a3a9eb58907fd0f60 + 813f634ceb016018f5acc9bd3c2b16e17dff4686 - + https://github.com/dotnet/dotnet - cb8306a63c5cf24e9381108a3a9eb58907fd0f60 + 813f634ceb016018f5acc9bd3c2b16e17dff4686 - + https://github.com/dotnet/dotnet - cb8306a63c5cf24e9381108a3a9eb58907fd0f60 + 813f634ceb016018f5acc9bd3c2b16e17dff4686 - + https://github.com/dotnet/dotnet - cb8306a63c5cf24e9381108a3a9eb58907fd0f60 + 813f634ceb016018f5acc9bd3c2b16e17dff4686 https://github.com/dotnet/xharness @@ -299,9 +295,9 @@ https://github.com/dotnet/xharness acc639bea6c5720abf118b8808e18f9cabe90568 - + https://github.com/dotnet/dotnet - cb8306a63c5cf24e9381108a3a9eb58907fd0f60 + 813f634ceb016018f5acc9bd3c2b16e17dff4686 https://dev.azure.com/dnceng/internal/_git/dotnet-optimization @@ -327,33 +323,33 @@ https://github.com/dotnet/runtime-assets a4665cef9921714c936e13cbcc7121d2683a6604 - + https://github.com/dotnet/dotnet - cb8306a63c5cf24e9381108a3a9eb58907fd0f60 + 813f634ceb016018f5acc9bd3c2b16e17dff4686 - + https://github.com/dotnet/dotnet - cb8306a63c5cf24e9381108a3a9eb58907fd0f60 + 813f634ceb016018f5acc9bd3c2b16e17dff4686 - + https://github.com/dotnet/dotnet - cb8306a63c5cf24e9381108a3a9eb58907fd0f60 + 813f634ceb016018f5acc9bd3c2b16e17dff4686 - + https://github.com/dotnet/dotnet - cb8306a63c5cf24e9381108a3a9eb58907fd0f60 + 813f634ceb016018f5acc9bd3c2b16e17dff4686 - + https://github.com/dotnet/dotnet - cb8306a63c5cf24e9381108a3a9eb58907fd0f60 + 813f634ceb016018f5acc9bd3c2b16e17dff4686 - + https://github.com/dotnet/dotnet - cb8306a63c5cf24e9381108a3a9eb58907fd0f60 + 813f634ceb016018f5acc9bd3c2b16e17dff4686 - + https://github.com/dotnet/dotnet - cb8306a63c5cf24e9381108a3a9eb58907fd0f60 + 813f634ceb016018f5acc9bd3c2b16e17dff4686 https://dev.azure.com/dnceng/internal/_git/dotnet-optimization @@ -365,53 +361,53 @@ - + https://github.com/dotnet/dotnet - cb8306a63c5cf24e9381108a3a9eb58907fd0f60 + 813f634ceb016018f5acc9bd3c2b16e17dff4686 - + https://github.com/dotnet/dotnet - cb8306a63c5cf24e9381108a3a9eb58907fd0f60 + 813f634ceb016018f5acc9bd3c2b16e17dff4686 - + https://github.com/dotnet/dotnet - cb8306a63c5cf24e9381108a3a9eb58907fd0f60 + 813f634ceb016018f5acc9bd3c2b16e17dff4686 - + https://github.com/dotnet/dotnet - cb8306a63c5cf24e9381108a3a9eb58907fd0f60 + 813f634ceb016018f5acc9bd3c2b16e17dff4686 - + https://github.com/dotnet/node - ec2960d941e015e05506ebf226cd9f549123ed01 + 547dab528bc5dfd593064589564b64501ad7ab78 - + https://github.com/dotnet/node - ec2960d941e015e05506ebf226cd9f549123ed01 + 547dab528bc5dfd593064589564b64501ad7ab78 - + https://github.com/dotnet/node - ec2960d941e015e05506ebf226cd9f549123ed01 + 547dab528bc5dfd593064589564b64501ad7ab78 - + https://github.com/dotnet/node - ec2960d941e015e05506ebf226cd9f549123ed01 + 547dab528bc5dfd593064589564b64501ad7ab78 - + https://github.com/dotnet/node - ec2960d941e015e05506ebf226cd9f549123ed01 + 547dab528bc5dfd593064589564b64501ad7ab78 - + https://github.com/dotnet/node - ec2960d941e015e05506ebf226cd9f549123ed01 + 547dab528bc5dfd593064589564b64501ad7ab78 - + https://github.com/dotnet/node - ec2960d941e015e05506ebf226cd9f549123ed01 + 547dab528bc5dfd593064589564b64501ad7ab78 - + https://github.com/dotnet/node - ec2960d941e015e05506ebf226cd9f549123ed01 + 547dab528bc5dfd593064589564b64501ad7ab78 https://github.com/dotnet/runtime-assets @@ -421,5 +417,9 @@ https://github.com/dotnet/runtime-assets a4665cef9921714c936e13cbcc7121d2683a6604 + + https://github.com/dotnet/dotnet + 813f634ceb016018f5acc9bd3c2b16e17dff4686 + diff --git a/eng/common/build.ps1 b/eng/common/build.ps1 index 2cbb725323e8f0..dd84699f500c09 100644 --- a/eng/common/build.ps1 +++ b/eng/common/build.ps1 @@ -23,6 +23,7 @@ Param( [switch] $clean, [switch][Alias('pb')]$productBuild, [switch]$fromVMR, + [switch]$disablePipelineSetResult, [switch][Alias('bl')]$binaryLog, [string][Alias('bln')]$binaryLogName = '', [switch][Alias('nobl')]$excludeCIBinarylog, @@ -80,6 +81,7 @@ function Print-Usage() { Write-Host " -nodeReuse Sets nodereuse msbuild parameter ('true' or 'false')" Write-Host " -buildCheck Sets /check msbuild parameter" Write-Host " -fromVMR Set when building from within the VMR" + Write-Host " -disablePipelineSetResult Set to disable masking the actual exit code in the pipeline when the build fails" Write-Host "" Write-Host "Command line arguments not listed above are passed thru to msbuild." diff --git a/eng/common/build.sh b/eng/common/build.sh index 3a9fdcfd0f5918..e37edd6cff34ad 100755 --- a/eng/common/build.sh +++ b/eng/common/build.sh @@ -40,12 +40,14 @@ usage() echo " --projects Project or solution file(s) to build" echo " --ci Set when running on CI server" echo " --excludeCIBinarylog Don't output binary log (short: -nobl)" + echo " --pipelinesLog Promote msbuild errors/warnings to Azure Pipelines timeline issues; defaults to on in CI (short: -pl)" echo " --prepareMachine Prepare machine for CI run, clean up processes after build" echo " --nodeReuse Sets nodereuse msbuild parameter ('true' or 'false')" echo " --warnAsError Sets warnaserror msbuild parameter ('true' or 'false')" echo " --warnNotAsError Sets a semi-colon delimited list of warning codes that should not be treated as errors" echo " --buildCheck Sets /check msbuild parameter" echo " --fromVMR Set when building from within the VMR" + echo " --disablePipelineSetResult Set to disable masking the actual exit code in the pipeline when the build fails" echo "" echo "Command line arguments not listed above are passed thru to msbuild." echo "Arguments can also be passed in with a single hyphen." @@ -68,6 +70,7 @@ build=false source_build=false product_build=false from_vmr=false +disable_pipeline_set_result=false rebuild=false test=false integration_test=false @@ -86,6 +89,7 @@ build_check=false binary_log=false binary_log_name='' exclude_ci_binary_log=false +pipelines_log=false projects='' configuration='' @@ -124,6 +128,9 @@ while [[ $# -gt 0 ]]; do -excludecibinarylog|-nobl) exclude_ci_binary_log=true ;; + -pipelineslog|-pl) + pipelines_log=true + ;; -restore|-r) restore=true ;; @@ -152,6 +159,9 @@ while [[ $# -gt 0 ]]; do -fromvmr|-from-vmr) from_vmr=true ;; + -disablepipelinesetresult|-disable-pipeline-set-result) + disable_pipeline_set_result=true + ;; -test|-t) test=true ;; @@ -213,6 +223,7 @@ if [[ -z "$configuration" ]]; then fi if [[ "$ci" == true ]]; then + pipelines_log=true # Disable node reuse on CI unless explicitly opted in via MSBUILD_NODEREUSE_ENABLED. # Internal testing only; this env var will be replaced with a switch (https://github.com/dotnet/arcade/issues/17013) and must not be depended on. if [[ "${MSBUILD_NODEREUSE_ENABLED:-}" != "1" ]]; then diff --git a/eng/common/core-templates/job/helix-job-monitor.yml b/eng/common/core-templates/job/helix-job-monitor.yml index 96287e55a15bfb..4247a4f30bdfd8 100644 --- a/eng/common/core-templates/job/helix-job-monitor.yml +++ b/eng/common/core-templates/job/helix-job-monitor.yml @@ -65,6 +65,14 @@ parameters: type: boolean default: true +# When true, test results are reported to Azure DevOps using the fully qualified test name +# (Namespace.Type.Method) as the stable automatedTestName and the visible title is qualified as +# well (--use-fully-qualified-test-name). Opt-in because it changes AzDO test identity and display; +# primarily useful for frameworks like MSTest whose display name is only the method name. +- name: useFullyQualifiedTestName + type: boolean + default: false + # Advanced: optional pipeline artifact (produced earlier in this run) that contains the tool # nupkg. When set, the artifact is downloaded and the tool is installed from the nupkg into # a local tool-path; this bypasses the repo's .config/dotnet-tools.json manifest and is @@ -176,11 +184,13 @@ jobs: set -euo pipefail toolArgs=( - --helix-base-uri '${{ parameters.helixBaseUri }}' - --polling-interval-seconds '${{ parameters.pollingIntervalSeconds }}' - --fail-on-failed-tests '${{ parameters.failWorkItemsWithFailedTests }}' - --max-wait-minutes "$((${{ parameters.timeoutInMinutes }} - 5))" # Set the tool's timeout slightly lower than the Azure DevOps job timeout to allow it to exit gracefully. - --stage-name '$(System.StageName)' + --helix-base-uri '${{ parameters.helixBaseUri }}' + --polling-interval-seconds '${{ parameters.pollingIntervalSeconds }}' + --fail-on-failed-tests '${{ parameters.failWorkItemsWithFailedTests }}' + --use-fully-qualified-test-name '${{ parameters.useFullyQualifiedTestName }}' + --max-wait-minutes "$((${{ parameters.timeoutInMinutes }} - 5))" # Set the tool's timeout slightly lower than the Azure DevOps job timeout to allow it to exit gracefully. + --stage-name '$(System.StageName)' + --stage-attempt '$(System.StageAttempt)' ) organization='${{ parameters.organization }}' diff --git a/eng/common/core-templates/job/onelocbuild.yml b/eng/common/core-templates/job/onelocbuild.yml index 86ea9f63504243..2816d2905a064c 100644 --- a/eng/common/core-templates/job/onelocbuild.yml +++ b/eng/common/core-templates/job/onelocbuild.yml @@ -8,6 +8,12 @@ parameters: CeapexPat: $(dn-bot-ceapex-package-r) # PAT for the loc AzDO instance https://dev.azure.com/ceapex GithubPat: $(BotAccount-dotnet-bot-repo-PAT) + # Service connection for WIF-based Entra authentication to ceapex feeds (replaces CeapexPat). + # When set, dnceng/internal builds acquire a federated Entra token instead of using a PAT. + # All other projects (e.g. DevDiv, public), where this dnceng-scoped service connection does not + # exist, and any pipeline that sets this to '' fall back to PAT-based auth via the CeapexPat parameter. + CeapexServiceConnection: 'dnceng-onelocbuild-ceapex' + SourcesDirectory: $(System.DefaultWorkingDirectory) CreatePr: true AutoCompletePr: false @@ -74,6 +80,15 @@ jobs: displayName: Generate LocProject.json condition: ${{ parameters.condition }} + # Acquire an Entra token for ceapex feed access via WIF (dnceng/internal only). + # All other projects use PAT-based auth, since the ceapex service connection is scoped to dnceng/internal. + - ${{ if and(ne(parameters.CeapexServiceConnection, ''), eq(variables['System.TeamProject'], 'internal')) }}: + - template: /eng/common/templates/steps/get-federated-access-token.yml + parameters: + federatedServiceConnection: ${{ parameters.CeapexServiceConnection }} + outputVariableName: 'CeapexEntraToken' + condition: ${{ parameters.condition }} + - task: OneLocBuild@2 displayName: OneLocBuild env: @@ -89,7 +104,10 @@ jobs: isUseLfLineEndingsSelected: ${{ parameters.UseLfLineEndings }} isShouldReusePrSelected: ${{ parameters.ReusePr }} packageSourceAuth: patAuth - patVariable: ${{ parameters.CeapexPat }} + ${{ if and(ne(parameters.CeapexServiceConnection, ''), eq(variables['System.TeamProject'], 'internal')) }}: + patVariable: $(CeapexEntraToken) + ${{ if or(eq(parameters.CeapexServiceConnection, ''), ne(variables['System.TeamProject'], 'internal')) }}: + patVariable: ${{ parameters.CeapexPat }} ${{ if eq(parameters.RepoType, 'gitHub') }}: repoType: ${{ parameters.RepoType }} gitHubPatVariable: "${{ parameters.GithubPat }}" diff --git a/eng/common/core-templates/steps/publish-logs.yml b/eng/common/core-templates/steps/publish-logs.yml index 2731e48cce4563..c496f3d0dc7a01 100644 --- a/eng/common/core-templates/steps/publish-logs.yml +++ b/eng/common/core-templates/steps/publish-logs.yml @@ -31,7 +31,6 @@ steps: -runtimeSourceFeed https://ci.dot.net/internal -runtimeSourceFeedKey '$(dotnetbuilds-internal-container-read-token-base64)' '$(publishing-dnceng-devdiv-code-r-build-re)' - '$(dn-bot-all-orgs-artifact-feeds-rw)' '$(akams-client-id)' '$(System.AccessToken)' ${{parameters.CustomSensitiveDataList}} diff --git a/eng/common/cross/build-rootfs.sh b/eng/common/cross/build-rootfs.sh index 453bb1ba5b1e4e..f58abbd2d10a23 100755 --- a/eng/common/cross/build-rootfs.sh +++ b/eng/common/cross/build-rootfs.sh @@ -8,8 +8,8 @@ usage() echo "BuildArch can be: arm(default), arm64, loongarch64, ppc64le, riscv64, s390x, x64, x86" echo "CodeName - optional, Code name for Linux, can be: xenial(default), zesty, bionic, alpine" echo " for alpine can be specified with version: alpineX.YY or alpineedge" - echo " for FreeBSD can be: freebsd13, freebsd14" - echo " for OpenBSD can be: openbsd" + echo " for FreeBSD can be: freebsd14, freebsd15" + echo " for OpenBSD can be: openbsd7.8, openbsd7.9" echo " for illumos can be: illumos" echo " for Haiku can be: haiku." echo "lldbx.y - optional, LLDB version, can be: lldb3.9(default), lldb4.0, lldb5.0, lldb6.0 no-lldb. Ignored for alpine and FreeBSD" @@ -78,9 +78,9 @@ __AlpinePackages+=" krb5-dev" __AlpinePackages+=" openssl-dev" __AlpinePackages+=" zlib-dev" -__FreeBSDBase="13.5-RELEASE" -__FreeBSDPkg="2.7.5" -__FreeBSDABI="13" +__FreeBSDBase="14.4-RELEASE" +__FreeBSDPkg="2.8.0" +__FreeBSDABI="14" __FreeBSDPackages="libunwind" __FreeBSDPackages+=" icu" __FreeBSDPackages+=" libinotify" @@ -187,17 +187,14 @@ while :; do __AlpineArch=loongarch64 __QEMUArch=loongarch64 __UbuntuArch=loong64 - __UbuntuSuites=unreleased __LLDB_Package="liblldb-19-dev" ;; riscv64) __BuildArch=riscv64 __AlpineArch=riscv64 - __AlpinePackages="${__AlpinePackages// lldb-dev/}" __QEMUArch=riscv64 __UbuntuArch=riscv64 - __UbuntuPackages="${__UbuntuPackages// libunwind8-dev/}" - unset __LLDB_Package + __LLDB_Package="liblldb-19-dev" ;; ppc64le) __BuildArch=ppc64le @@ -291,6 +288,10 @@ while :; do __CodeName=noble __LLDB_Package="liblldb-19-dev" ;; + resolute) # Ubuntu 26.04 + __CodeName=resolute + __LLDB_Package="liblldb-21-dev" + ;; stretch) # Debian 9 __CodeName=stretch __LLDB_Package="liblldb-6.0-dev" @@ -331,7 +332,7 @@ while :; do # Debian-Ports architectures need different values case "$__UbuntuArch" in - amd64|arm64|armhf|i386|mips64el|ppc64el|riscv64|s390x) + amd64|arm64|armhf|i386|mips64el|ppc64el|riscv64|loong64|s390x) __KeyringFile="/usr/share/keyrings/debian-archive-keyring.gpg" if [[ -z "$__UbuntuRepo" ]]; then @@ -365,20 +366,29 @@ while :; do __AlpineVersion="$__AlpineMajorVersion.$__AlpineMinorVersion" fi ;; - freebsd13) + freebsd14) __CodeName=freebsd __SkipUnmount=1 ;; - freebsd14) + freebsd15) __CodeName=freebsd - __FreeBSDBase="14.3-RELEASE" - __FreeBSDABI="14" + __FreeBSDBase="15.1-RELEASE" + __FreeBSDABI="15" __SkipUnmount=1 ;; openbsd) __CodeName=openbsd __SkipUnmount=1 ;; + openbsd7.8) + __CodeName=openbsd + __SkipUnmount=1 + ;; + openbsd7.9) + __CodeName=openbsd + __OpenBSDVersion="7.9" + __SkipUnmount=1 + ;; illumos) __CodeName=illumos __SkipUnmount=1 @@ -453,9 +463,12 @@ case "$__AlpineVersion" in elif [[ "$__AlpineArch" == "x86" ]]; then __AlpineVersion=3.17 # minimum version that supports lldb-dev __AlpinePackages+=" llvm15-libs" - elif [[ "$__AlpineArch" == "riscv64" || "$__AlpineArch" == "loongarch64" ]]; then + elif [[ "$__AlpineArch" == "loongarch64" ]]; then __AlpineVersion=3.21 # minimum version that supports lldb-dev __AlpinePackages+=" llvm19-libs" + elif [[ "$__AlpineArch" == "riscv64" ]]; then + __AlpineVersion=3.22 # lldb-dev requires 3.21+, but 3.22+ provides the newer linux-headers needed for RISC-V extension probes + __AlpinePackages+=" llvm20-libs" elif [[ -n "$__AlpineMajorVersion" ]]; then # use whichever alpine version is provided and select the latest toolchain libs __AlpineLlvmLibsLookup=1 diff --git a/eng/common/cross/toolchain.cmake b/eng/common/cross/toolchain.cmake index ead7fe3ef26319..70b71395e3ba72 100644 --- a/eng/common/cross/toolchain.cmake +++ b/eng/common/cross/toolchain.cmake @@ -87,6 +87,8 @@ elseif(TARGET_ARCH_NAME STREQUAL "ppc64le") set(CMAKE_SYSTEM_PROCESSOR ppc64le) if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/powerpc64le-alpine-linux-musl) set(TOOLCHAIN "powerpc64le-alpine-linux-musl") + elseif(FREEBSD) + set(TOOLCHAIN "powerpc64le-unknown-freebsd14") else() set(TOOLCHAIN "powerpc64le-linux-gnu") endif() diff --git a/eng/common/native/init-os-and-arch.sh b/eng/common/native/init-os-and-arch.sh index 38921d4338f744..62d62fed522aa6 100644 --- a/eng/common/native/init-os-and-arch.sh +++ b/eng/common/native/init-os-and-arch.sh @@ -27,6 +27,10 @@ if [ "$os" = "sunos" ]; then os="solaris" fi CPUName=$(isainfo -n) +elif [ "$os" = "freebsd" ]; then + # FreeBSD's `uname -m` is the machine class ("powerpc" for every PowerPC + # variant); `uname -p` gives the specific processor (e.g. powerpc64le). + CPUName=$(uname -p) else # For the rest of the operating systems, use uname(1) to determine what the CPU is. CPUName=$(uname -m) @@ -75,7 +79,7 @@ case "$CPUName" in arch=s390x ;; - ppc64le) + ppc64le|powerpc64le) arch=ppc64le ;; *) diff --git a/eng/common/sdk-task.ps1 b/eng/common/sdk-task.ps1 index 68119de603efe6..8d72d803dd2a99 100644 --- a/eng/common/sdk-task.ps1 +++ b/eng/common/sdk-task.ps1 @@ -4,7 +4,9 @@ Param( [string] $task, [string] $verbosity = 'minimal', [string] $msbuildEngine = $null, - [switch] $restore, + # Restore defaults to on; -restore is retained only so existing consumers that pass it don't break. Use -norestore to opt out. + [switch] $restore = $true, + [switch] $norestore, [switch] $prepareMachine, [switch][Alias('nobl')]$excludeCIBinaryLog, [switch]$noWarnAsError, @@ -18,12 +20,23 @@ $ci = $true $binaryLog = if ($excludeCIBinaryLog) { $false } else { $true } $warnAsError = if ($noWarnAsError) { $false } else { $true } +# Reconcile the restore state before importing tools.ps1: it reads $restore at import time to +# decide whether toolset/SDK acquisition installs. -norestore must win so that skipping restore +# also skips toolset initialization, not just the explicit Restore build below. +if ($norestore) { $restore = $false } + +# sdk-task runs a standalone Arcade SDK task and does not need repo-specific toolset setup. +# Skip importing configure-toolset.ps1 so its side effects (e.g. a repo's configure-toolset.ps1 +# calling exit) don't terminate this script before the task runs. +$disableConfigureToolsetImport = $true + . $PSScriptRoot\tools.ps1 function Print-Usage() { Write-Host "Common settings:" Write-Host " -task Name of Arcade task (name of a project in toolset directory of the Arcade SDK package)" - Write-Host " -restore Restore dependencies" + Write-Host " -restore (Legacy) Restore runs by default; retained for backward compatibility. Use -norestore to skip" + Write-Host " -norestore Skip restoring dependencies" Write-Host " -verbosity Msbuild verbosity: q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic]" Write-Host " -help Print help and exit" Write-Host "" diff --git a/eng/common/sdk-task.sh b/eng/common/sdk-task.sh index 1cf71bb2aea4ff..a7f1ba060d7335 100755 --- a/eng/common/sdk-task.sh +++ b/eng/common/sdk-task.sh @@ -3,7 +3,8 @@ show_usage() { echo "Common settings:" echo " --task Name of Arcade task (name of a project in toolset directory of the Arcade SDK package)" - echo " --restore Restore dependencies" + echo " --restore (Legacy) Restore runs by default; retained for backward compatibility. Use --norestore to skip" + echo " --norestore Skip restoring dependencies" echo " --verbosity Msbuild verbosity: q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic]" echo " --help Print help and exit" echo "" @@ -50,10 +51,11 @@ binary_log=true configuration="Debug" verbosity="minimal" exclude_ci_binary_log=false -restore=false +# restore defaults to on; --restore is retained only so existing consumers that pass it don't break. Use --norestore to opt out. +restore=true help=false properties='' -warnAsError=true +warn_as_error=true while (($# > 0)); do lowerI="$(echo $1 | tr "[:upper:]" "[:lower:]")" @@ -63,7 +65,10 @@ while (($# > 0)); do shift 2 ;; --restore) - restore=true + shift 1 + ;; + --norestore) + restore=false shift 1 ;; --verbosity) @@ -75,8 +80,8 @@ while (($# > 0)); do exclude_ci_binary_log=true shift 1 ;; - --noWarnAsError) - warnAsError=false + --nowarnaserror) + warn_as_error=false shift 1 ;; --help) @@ -97,6 +102,11 @@ if $help; then exit 0 fi +# sdk-task runs a standalone Arcade SDK task and does not need repo-specific toolset setup. +# Skip importing configure-toolset.sh so its side effects (e.g. a repo's configure-toolset.sh +# calling exit) don't terminate this script before the task runs. +disable_configure_toolset_import=1 + . "$scriptroot/tools.sh" InitializeToolset diff --git a/eng/common/tools.ps1 b/eng/common/tools.ps1 index 6f664ad890ba68..da07386ff1fe6c 100644 --- a/eng/common/tools.ps1 +++ b/eng/common/tools.ps1 @@ -13,6 +13,12 @@ # Set to true to output binary log from msbuild. Note that emitting binary log slows down the build. [bool]$binaryLog = if (Test-Path variable:binaryLog) { $binaryLog } else { $ci -and !$excludeCIBinarylog } +# Set to true to use the pipelines logger which will enable Azure logging output. +# https://github.com/Microsoft/azure-pipelines-tasks/blob/master/docs/authoring/commands.md +# This flag is meant as a temporary opt-in for the feature while validating it across +# our consumers. It will be deleted in the future. +[bool]$pipelinesLog = if (Test-Path variable:pipelinesLog) { $pipelinesLog } else { $ci } + # Turns on machine preparation/clean up code that changes the machine state (e.g. kills build processes). [bool]$prepareMachine = if (Test-Path variable:prepareMachine) { $prepareMachine } else { $false } @@ -65,6 +71,8 @@ $ErrorActionPreference = 'Stop' # True when the build is running within the VMR. [bool]$fromVMR = if (Test-Path variable:fromVMR) { $fromVMR } else { $false } +[bool]$disablePipelineSetResult = if (Test-Path variable:disablePipelineSetResult) { $disablePipelineSetResult } else { $false } + function Create-Directory ([string[]] $path) { New-Item -Path $path -Force -ItemType 'Directory' | Out-Null } @@ -713,7 +721,17 @@ function InitializeToolset() { $downloadArgs += "--configfile" $downloadArgs += $nugetConfig } - DotNet @downloadArgs + + # 'dotnet package download' fails outright if any source in the repo's NuGet.config is + # unavailable (for example a transport feed that was decommissioned after a release). The + # Arcade SDK is always published to the public dotnet-eng feed, so if the config-driven + # download fails, retry once against that feed directly (which ignores the other sources) + # before giving up, so a single dead source doesn't block the build. + $downloadExitCode = DotNet -ignoreFailure @downloadArgs + if ($downloadExitCode) { + Write-Host "Restoring the Arcade SDK from the configured sources failed; retrying from the public dotnet-eng feed." + DotNet @downloadArgs --source "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json" + } $packageDir = Join-Path $nugetPackageCachePath (Join-Path 'microsoft.dotnet.arcade.sdk' $toolsetVersion) $packageToolsetDir = Join-Path $packageDir 'toolset' @@ -775,6 +793,19 @@ function MSBuild() { $buildTool = InitializeBuildTool + if ($pipelinesLog) { + $toolsetBuildProject = InitializeToolset + $basePath = Split-Path -parent $toolsetBuildProject + $selectedPath = Join-Path $basePath (Join-Path 'net' 'Microsoft.DotNet.ArcadeLogging.dll') + + # Only inject the logger when it's present. A last-known-good Arcade used to bootstrap + # the build may not ship the logger yet, so its absence must not be a hard error. + # Specify the logger type explicitly so loading is deterministic. + if (Test-Path $selectedPath) { + $args += "/logger:Microsoft.DotNet.ArcadeLogging.PipelinesLogger,$selectedPath" + } + } + $cmdArgs = "$($buildTool.Command) /m /nologo /clp:Summary /v:$verbosity /nr:$nodeReuse /p:ContinuousIntegrationBuild=$ci" # Add -mt flag for MSBuild multithreaded mode if enabled via environment variable @@ -790,7 +821,8 @@ function MSBuild() { } if ($warnAsError -and $warnNotAsError) { - $cmdArgs += " /warnnotaserror:$warnNotAsError /p:AdditionalWarningsNotAsErrors=$warnNotAsError" + $escapedWarnNotAsError = $warnNotAsError -replace ';', '%3B' + $cmdArgs += " /warnnotaserror:$warnNotAsError /p:AdditionalWarningsNotAsErrors=$escapedWarnNotAsError" } foreach ($arg in $args) { @@ -813,8 +845,8 @@ function MSBuild() { Write-Host "Build failed with exit code $exitCode. Check errors above." -ForegroundColor Red # When running on Azure Pipelines, override the returned exit code to avoid double logging. - # Skip this when the build is a child of the VMR build. - if ($ci -and $env:SYSTEM_TEAMPROJECT -ne $null -and !$fromVMR) { + # Skip this when the build is a child of the VMR build, or when -disablePipelineSetResult is set so the real exit code propagates. + if ($ci -and $env:SYSTEM_TEAMPROJECT -ne $null -and !$fromVMR -and !$disablePipelineSetResult) { Write-PipelineSetResult -Result "Failed" -Message "msbuild execution failed." # Exiting with an exit code causes the azure pipelines task to log yet another "noise" error # The above Write-PipelineSetResult will cause the task to be marked as failure without adding yet another error @@ -829,7 +861,7 @@ function MSBuild() { # Executes a dotnet command with arguments passed to the function. # Terminates the script if the command fails. # -function DotNet() { +function DotNet([switch]$ignoreFailure) { $dotnetRoot = InitializeDotNetCli -install:$restore $dotnetPath = Join-Path $dotnetRoot (GetExecutableFileName 'dotnet') @@ -848,9 +880,15 @@ function DotNet() { $exitCode = Exec-Process $dotnetPath $cmdArgs if ($exitCode -ne 0) { + # When -ignoreFailure is set, return the exit code to the caller so it can implement + # its own fallback logic instead of terminating the script. + if ($ignoreFailure) { + return $exitCode + } + Write-Host "dotnet command failed with exit code $exitCode. Check errors above." -ForegroundColor Red - if ($ci -and $env:SYSTEM_TEAMPROJECT -ne $null -and !$fromVMR) { + if ($ci -and $env:SYSTEM_TEAMPROJECT -ne $null -and !$fromVMR -and !$disablePipelineSetResult) { Write-PipelineSetResult -Result "Failed" -Message "dotnet command execution failed." ExitWithExitCode 0 } else { diff --git a/eng/common/tools.sh b/eng/common/tools.sh index 347a29b8884fe8..20f791c11dee0b 100755 --- a/eng/common/tools.sh +++ b/eng/common/tools.sh @@ -8,6 +8,16 @@ ci=${ci:-false} # Build mode source_build=${source_build:-false} +# Set to true to use the pipelines logger which will enable Azure logging output. +# https://github.com/Microsoft/azure-pipelines-tasks/blob/master/docs/authoring/commands.md +# This flag is meant as a temporary opt-in for the feature while validating it across +# our consumers. It will be deleted in the future. +if [[ "$ci" == true ]]; then + pipelines_log=${pipelines_log:-true} +else + pipelines_log=${pipelines_log:-false} +fi + # Build configuration. Common values include 'Debug' and 'Release', but the repository may use other names. configuration=${configuration:-'Debug'} @@ -68,6 +78,8 @@ runtime_source_feed_key=${runtime_source_feed_key:-''} # True when the build is running within the VMR. from_vmr=${from_vmr:-false} +disable_pipeline_set_result=${disable_pipeline_set_result:-false} + # Resolve any symlinks in the given path. function ResolvePath { local path=$1 @@ -442,7 +454,16 @@ function InitializeToolset { if [[ -n "$nuget_config" ]]; then download_args+=("--configfile" "$nuget_config") fi - DotNet "${download_args[@]}" + + # 'dotnet package download' fails outright if any source in the repo's NuGet.config is + # unavailable (for example a transport feed that was decommissioned after a release). The + # Arcade SDK is always published to the public dotnet-eng feed, so if the config-driven + # download fails, retry once against that feed directly (which ignores the other sources) + # before giving up, so a single dead source doesn't block the build. + if ! DotNet true "${download_args[@]}"; then + echo "Restoring the Arcade SDK from the configured sources failed; retrying from the public dotnet-eng feed." + DotNet "${download_args[@]}" --source "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json" + fi local package_dir="$_InitializeNuGetPackageCachePath/microsoft.dotnet.arcade.sdk/$toolset_version" @@ -481,6 +502,15 @@ function StopProcesses { } function DotNet { + # When the first argument is 'true' or 'false' it controls the exit behavior on failure: + # 'true' returns the dotnet exit code to the caller (so it can implement its own fallback), + # while the default terminates the script. Any other first argument is treated as a dotnet argument. + local ignore_failure=false + if [[ "$1" == 'true' || "$1" == 'false' ]]; then + ignore_failure="$1" + shift + fi + InitializeDotNetCli $restore local dotnet_path="$_InitializeDotNetCli/dotnet" @@ -489,9 +519,14 @@ function DotNet { "$dotnet_path" "$@" || { local exit_code=$? + + if [[ "$ignore_failure" == true ]]; then + return $exit_code + fi + echo "dotnet command failed with exit code $exit_code. Check errors above." - if [[ "$ci" == true && -n ${SYSTEM_TEAMPROJECT:-} && "$from_vmr" != true ]]; then + if [[ "$ci" == true && -n ${SYSTEM_TEAMPROJECT:-} && "$from_vmr" != true && "$disable_pipeline_set_result" != true ]]; then Write-PipelineSetResult -result "Failed" -message "dotnet command execution failed." ExitWithExitCode 0 else @@ -510,6 +545,21 @@ function MSBuild { InitializeBuildTool + local logger_switch=() + if [[ "$pipelines_log" == true ]]; then + InitializeToolset + + local toolset_dir="${_InitializeToolset%/*}" + local selectedPath="$toolset_dir/net/Microsoft.DotNet.ArcadeLogging.dll" + + # Only inject the logger when it's present. A last-known-good Arcade used to bootstrap + # the build may not ship the logger yet, so its absence must not be a hard error. + # Specify the logger type explicitly so loading is deterministic. + if [[ -f "$selectedPath" ]]; then + logger_switch=("-logger:Microsoft.DotNet.ArcadeLogging.PipelinesLogger,$selectedPath") + fi + fi + local warnaserror_switch="" if [[ $warn_as_error == true ]]; then warnaserror_switch="/warnaserror" @@ -525,8 +575,8 @@ function MSBuild { echo "Build failed with exit code $exit_code. Check errors above." # When running on Azure Pipelines, override the returned exit code to avoid double logging. - # Skip this when the build is a child of the VMR build. - if [[ "$ci" == true && -n ${SYSTEM_TEAMPROJECT:-} && "$from_vmr" != true ]]; then + # Skip this when the build is a child of the VMR build, or when -disablePipelineSetResult is set so the real exit code propagates. + if [[ "$ci" == true && -n ${SYSTEM_TEAMPROJECT:-} && "$from_vmr" != true && "$disable_pipeline_set_result" != true ]]; then Write-PipelineSetResult -result "Failed" -message "msbuild execution failed." # Exiting with an exit code causes the azure pipelines task to log yet another "noise" error # The above Write-PipelineSetResult will cause the task to be marked as failure without adding yet another error @@ -545,10 +595,10 @@ function MSBuild { local warnnotaserror_switch="" if [[ -n "$warn_not_as_error" && "$warn_as_error" == true ]]; then - warnnotaserror_switch="/warnnotaserror:$warn_not_as_error /p:AdditionalWarningsNotAsErrors=$warn_not_as_error" + warnnotaserror_switch="/warnnotaserror:$warn_not_as_error /p:AdditionalWarningsNotAsErrors=${warn_not_as_error//;/%3B}" fi - 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 "$@" + RunBuildTool "$_InitializeBuildToolCommand" /m /nologo /clp:Summary /v:$verbosity /nr:$node_reuse $warnaserror_switch $mt_switch $warnnotaserror_switch ${logger_switch[@]+"${logger_switch[@]}"} /p:TreatWarningsAsErrors=$warn_as_error /p:ContinuousIntegrationBuild=$ci "$@" } function GetDarc { diff --git a/global.json b/global.json index 86cfa91746b514..ecfd1dfa0f2c2b 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "11.0.100-preview.6.26352.110", + "version": "11.0.100-preview.6.26359.118", "allowPrerelease": true, "rollForward": "major", "paths": [ @@ -10,14 +10,14 @@ "errorMessage": "The required .NET SDK wasn't found. Please run ./eng/common/dotnet.sh (Unix) or eng\\common\\dotnet.cmd (Windows) to install it." }, "tools": { - "dotnet": "11.0.100-preview.6.26352.110" + "dotnet": "11.0.100-preview.6.26359.118" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "11.0.0-beta.26365.101", - "Microsoft.DotNet.Helix.Sdk": "11.0.0-beta.26365.101", - "Microsoft.DotNet.SharedFramework.Sdk": "11.0.0-beta.26365.101", + "Microsoft.DotNet.Arcade.Sdk": "11.0.0-beta.26379.102", + "Microsoft.DotNet.Helix.Sdk": "11.0.0-beta.26379.102", + "Microsoft.DotNet.SharedFramework.Sdk": "11.0.0-beta.26379.102", "Microsoft.Build.NoTargets": "3.7.0", "Microsoft.Build.Traversal": "3.4.0", - "Microsoft.NET.Sdk.IL": "11.0.0-preview.7.26365.101" + "Microsoft.NET.Sdk.IL": "11.0.0-rc.1.26379.102" } } From 19c4c768e9728c9167be3d849739da8b9f956ca4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20K=C3=B6plinger?= Date: Thu, 30 Jul 2026 11:43:13 +0200 Subject: [PATCH 3/9] Bump MicrosoftDiagnosticsNetCoreClientVersion --- eng/Versions.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/Versions.props b/eng/Versions.props index 4727d1ebfd8c30..a74731b136d440 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -128,7 +128,7 @@ 2.0.0 17.10.0-beta1.24272.1 3.1.28 - 0.2.721401 + 0.2.736901 2.1.0 2.0.3 1.0.4-preview6.19326.1 From 8803a718ad2f2cce243d9324e89c5bc21ca5adcb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20K=C3=B6plinger?= Date: Thu, 30 Jul 2026 11:44:29 +0200 Subject: [PATCH 4/9] Fix CA1860: Prefer comparing 'Count' to 0 rather than using 'Any()' --- .../src/DependencyContextWriter.cs | 6 +++--- .../TypedParts/TypedPartExportDescriptorProvider.cs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libraries/Microsoft.Extensions.DependencyModel/src/DependencyContextWriter.cs b/src/libraries/Microsoft.Extensions.DependencyModel/src/DependencyContextWriter.cs index 86c1a548b491b8..402dde87f8c4a1 100644 --- a/src/libraries/Microsoft.Extensions.DependencyModel/src/DependencyContextWriter.cs +++ b/src/libraries/Microsoft.Extensions.DependencyModel/src/DependencyContextWriter.cs @@ -30,7 +30,7 @@ public void Write(DependencyContext context, Stream stream) WriteCompilationOptions(context.CompilationOptions, jsonWriter); WriteTargets(context, jsonWriter); WriteLibraries(context, jsonWriter); - if (context.RuntimeGraph.Any()) + if (context.RuntimeGraph.Count > 0) { WriteRuntimeGraph(context, jsonWriter); } @@ -74,7 +74,7 @@ private static void WriteRuntimeGraph(DependencyContext context, Utf8JsonWriter private static void WriteCompilationOptions(CompilationOptions compilationOptions, Utf8JsonWriter jsonWriter) { jsonWriter.WriteStartObject(DependencyContextStrings.CompilationOptionsPropertyName); - if (compilationOptions.Defines?.Any() == true) + if (compilationOptions.Defines?.Count > 0) { jsonWriter.WriteStartArray(DependencyContextStrings.DefinesPropertyName); foreach (string? define in compilationOptions.Defines) @@ -185,7 +185,7 @@ private static void AddCompilationAssemblies(IEnumerable compilationAsse private static void AddAssets(string key, RuntimeAssetGroup? group, Utf8JsonWriter jsonWriter) { - if (group == null || !group.RuntimeFiles.Any()) + if (group == null || group.RuntimeFiles.Count == 0) { return; } diff --git a/src/libraries/System.Composition.TypedParts/src/System/Composition/TypedParts/TypedPartExportDescriptorProvider.cs b/src/libraries/System.Composition.TypedParts/src/System/Composition/TypedParts/TypedPartExportDescriptorProvider.cs index 107caf16783105..de2baa34eea922 100644 --- a/src/libraries/System.Composition.TypedParts/src/System/Composition/TypedParts/TypedPartExportDescriptorProvider.cs +++ b/src/libraries/System.Composition.TypedParts/src/System/Composition/TypedParts/TypedPartExportDescriptorProvider.cs @@ -64,7 +64,7 @@ public override IEnumerable GetExportDescriptors(Compos // Exports with metadata may be matched via metadata constraints. // It should be possible to do this more aggressively by changing the way // exports are stored. - if (!forKey.Any(x => x.Metadata.Any())) + if (!forKey.Any(x => x.Metadata.Count > 0)) { // Allow some garbage to be collected _discoveredParts.Remove(contract); From 7a838d8330520d05ab9f83828b9c7bad04b8b306 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20K=C3=B6plinger?= Date: Fri, 31 Jul 2026 01:06:32 +0200 Subject: [PATCH 5/9] Remove ref discards from StructureMarshaler that now emit null dereferences The new Roslyn toolset compiles `_ = ref x;` as a value discard, emitting `ldarg; ldind.ref; pop` instead of nothing. In StructureMarshaler those statements existed only to satisfy IDE0060 for the managed fallback bodies of JIT intrinsics, whose callers (the Marshal.LayoutTypeMarshalerMethods delegate path) pass `ref Unsafe.NullRef()`. The extra dereference therefore threw NullReferenceException. Drop the discards and suppress IDE0060 with the pragma idiom already used elsewhere in this file. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 8591ab4e-b1d7-40df-80f0-9a476a7bfd9d --- .../src/System/StubHelpers.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs b/src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs index 3d5f7da15005ef..667f84ffc30b28 100644 --- a/src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs +++ b/src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs @@ -721,7 +721,7 @@ internal static void ClearNative(IntPtr pMarshalState, in object pManagedHome, I { ClearNative(pMarshalState, pNativeHome); } -#pragma warning restore IDE0060 +#pragma warning restore IDE0060 // Remove unused parameter [LibraryImport(RuntimeHelpers.QCall, EntryPoint = "MngdSafeArrayMarshaler_ClearNative")] private static partial void ClearNative(IntPtr pMarshalState, IntPtr pNativeHome); @@ -1408,7 +1408,6 @@ private static void Validate() private static void ConvertToUnmanagedCore(ref T managed, byte* unmanaged, ref CleanupWorkListElement? cleanupWorkList) { Validate(); - _ = ref cleanupWorkList; SpanHelpers.Memmove(ref *unmanaged, ref Unsafe.As(ref managed), (nuint)sizeof(T)); } @@ -1432,20 +1431,21 @@ public static void ConvertToUnmanaged(ref T managed, byte* unmanaged, ref Cleanu public static void ConvertToManaged(ref T managed, byte* unmanaged, ref CleanupWorkListElement? cleanupWorkList) { Validate(); - _ = ref cleanupWorkList; SpanHelpers.Memmove(ref Unsafe.As(ref managed), ref *unmanaged, (nuint)sizeof(T)); } + // This is the managed fallback body for a JIT intrinsic, so it must keep the shape of the other + // marshaler methods even though it uses none of its parameters. The parameters must not be + // dereferenced here: callers can pass null refs (Unsafe.NullRef), which would throw. +#pragma warning disable IDE0060 // Remove unused parameter [Intrinsic] private static void FreeCore(ref T managed, byte* unmanaged, ref CleanupWorkListElement? cleanupWorkList) { Validate(); -#nullable disable warnings // https://github.com/dotnet/roslyn/issues/82919 - _ = ref managed; -#nullable restore warnings - _ = unmanaged; - _ = ref cleanupWorkList; + + // Blittable structs own no native resources, so there is nothing to free. } +#pragma warning restore IDE0060 // Remove unused parameter public static void Free(ref T managed, byte* unmanaged, ref CleanupWorkListElement? cleanupWorkList) { From 274bcd27b98c95e9ccdc1a205a500056e6f85797 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20K=C3=B6plinger?= Date: Fri, 31 Jul 2026 01:06:41 +0200 Subject: [PATCH 6/9] Fix infinite recursion for recursive unions in the STJ source generator For a union case whose type is the union type itself, the emitted type pattern is trivially satisfied by the union value, so with the new Roslyn toolset the designator binds the union instead of its payload. The emitted deconstructor then returned the same value it was given and JsonUnionConverter recursed until it threw "possible object cycle". Emit an arm that reads the payload off the union's Value property instead. The parser already requires a public `object Value` property for every source-generated union. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 8591ab4e-b1d7-40df-80f0-9a476a7bfd9d --- .../gen/JsonSourceGenerator.Emitter.cs | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/libraries/System.Text.Json/gen/JsonSourceGenerator.Emitter.cs b/src/libraries/System.Text.Json/gen/JsonSourceGenerator.Emitter.cs index a6d9bbf360961a..128b1bdd902283 100644 --- a/src/libraries/System.Text.Json/gen/JsonSourceGenerator.Emitter.cs +++ b/src/libraries/System.Text.Json/gen/JsonSourceGenerator.Emitter.cs @@ -783,7 +783,21 @@ private static SourceText GenerateForUnion(ContextGenerationSpec contextSpec, Ty } string patternTypeFQN = caseSpec.PatternType.FullyQualifiedName; - writer.WriteLine($"{patternTypeFQN} caseValue{deconArmIndex} => (typeof({caseSpec.CaseType.FullyQualifiedName}), (object?)caseValue{deconArmIndex}),"); + + if (patternTypeFQN == typeMetadata.TypeRef.FullyQualifiedName) + { + // Recursive case: the case type is the union type itself. A type + // pattern for it is trivially satisfied by the union value, so the + // designator binds the union rather than its payload. Returning it + // would make the converter recurse on the same value forever, so + // read the payload off the union's Value property instead. + writer.WriteLine($"{patternTypeFQN} => (typeof({caseSpec.CaseType.FullyQualifiedName}), (object?)value.Value),"); + } + else + { + writer.WriteLine($"{patternTypeFQN} caseValue{deconArmIndex} => (typeof({caseSpec.CaseType.FullyQualifiedName}), (object?)caseValue{deconArmIndex}),"); + } + deconArmIndex++; } From 177a8bce6793360ae5efbd476045d3753e73a8cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20K=C3=B6plinger?= Date: Mon, 3 Aug 2026 10:42:12 +0200 Subject: [PATCH 7/9] Address review feedback: match the union payload with a property pattern Use `{ Value: T x }` for the recursive union case instead of a bare type pattern. The bare pattern is trivially satisfied by the union instance, so it never verified that the payload actually had the case type and it shadowed every arm emitted after it. Case order follows declaration order for unrelated case types, so a union declaring its recursive case first produced generated code that failed to compile with CS8510. Add a union that declares the recursive case first as a regression test. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 8591ab4e-b1d7-40df-80f0-9a476a7bfd9d --- .../gen/JsonSourceGenerator.Emitter.cs | 13 +++++++------ .../tests/Common/UnionTests.cs | 18 ++++++++++++++++++ .../Serialization/UnionTests.cs | 2 ++ 3 files changed, 27 insertions(+), 6 deletions(-) diff --git a/src/libraries/System.Text.Json/gen/JsonSourceGenerator.Emitter.cs b/src/libraries/System.Text.Json/gen/JsonSourceGenerator.Emitter.cs index 128b1bdd902283..6f5654c1e7fbd4 100644 --- a/src/libraries/System.Text.Json/gen/JsonSourceGenerator.Emitter.cs +++ b/src/libraries/System.Text.Json/gen/JsonSourceGenerator.Emitter.cs @@ -786,12 +786,13 @@ private static SourceText GenerateForUnion(ContextGenerationSpec contextSpec, Ty if (patternTypeFQN == typeMetadata.TypeRef.FullyQualifiedName) { - // Recursive case: the case type is the union type itself. A type - // pattern for it is trivially satisfied by the union value, so the - // designator binds the union rather than its payload. Returning it - // would make the converter recurse on the same value forever, so - // read the payload off the union's Value property instead. - writer.WriteLine($"{patternTypeFQN} => (typeof({caseSpec.CaseType.FullyQualifiedName}), (object?)value.Value),"); + // Recursive case: the case type is the union type itself. A type pattern `T` + // applied to a union is equivalent to `T or { Value: T }`, so a bare type + // pattern here is also satisfied by the union instance itself. That both binds + // the union rather than its payload -- making the converter recurse on the same + // value forever -- and renders any later arm unreachable. Match the payload + // explicitly so that only the unwrapped value is bound. + writer.WriteLine($"{{ Value: {patternTypeFQN} caseValue{deconArmIndex} }} => (typeof({caseSpec.CaseType.FullyQualifiedName}), (object?)caseValue{deconArmIndex}),"); } else { diff --git a/src/libraries/System.Text.Json/tests/Common/UnionTests.cs b/src/libraries/System.Text.Json/tests/Common/UnionTests.cs index ad73d52ce1b582..e125d7a4f012ec 100644 --- a/src/libraries/System.Text.Json/tests/Common/UnionTests.cs +++ b/src/libraries/System.Text.Json/tests/Common/UnionTests.cs @@ -1755,6 +1755,24 @@ public async Task RecursiveUnion_RoundTrip_FlattensNesting() Assert.Equal(true, GetUnionValue(deserialized!)); } + // Declares the recursive case before the scalar case: the recursive arm must not + // shadow the arms that follow it. + public union RecursiveNatReversed(RecursiveNatReversed, bool); + + [Fact] + public async Task RecursiveUnion_RecursiveCaseDeclaredFirst_RoundTrips() + { + var tripleNested = new RecursiveNatReversed(new RecursiveNatReversed(new RecursiveNatReversed(true))); + + string json = await Serializer.SerializeWrapper(tripleNested); + Assert.Equal("true", json); + + RecursiveNatReversed? deserialized = await Serializer.DeserializeWrapper(json); + Assert.NotNull(deserialized); + Assert.IsType(GetUnionValue(deserialized!)); + Assert.Equal(true, GetUnionValue(deserialized!)); + } + #endregion #region Cyclic object graph diff --git a/src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Tests/Serialization/UnionTests.cs b/src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Tests/Serialization/UnionTests.cs index e21e183e962425..fcf82232877fc7 100644 --- a/src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Tests/Serialization/UnionTests.cs +++ b/src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Tests/Serialization/UnionTests.cs @@ -51,6 +51,7 @@ public UnionTests_Metadata() [JsonSerializable(typeof(CustomDiscriminatedFlora))] [JsonSerializable(typeof(NullableEnumUnion))] [JsonSerializable(typeof(RecursiveNat))] + [JsonSerializable(typeof(RecursiveNatReversed))] [JsonSerializable(typeof(SelfReferentialUnion))] internal sealed partial class UnionTestsContext_Metadata : JsonSerializerContext { @@ -110,6 +111,7 @@ public UnionTests_Default() [JsonSerializable(typeof(CustomDiscriminatedFlora))] [JsonSerializable(typeof(NullableEnumUnion))] [JsonSerializable(typeof(RecursiveNat))] + [JsonSerializable(typeof(RecursiveNatReversed))] [JsonSerializable(typeof(SelfReferentialUnion))] internal sealed partial class UnionTestsContext_Default : JsonSerializerContext { From 233e2c9ae546f0cf0d0faac9c25f90f56a1fbb9d Mon Sep 17 00:00:00 2001 From: Jan Kotas Date: Mon, 3 Aug 2026 09:15:06 -0700 Subject: [PATCH 8/9] Update src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs --- src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs b/src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs index 667f84ffc30b28..436c125bc3fe19 100644 --- a/src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs +++ b/src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs @@ -1434,9 +1434,8 @@ public static void ConvertToManaged(ref T managed, byte* unmanaged, ref CleanupW SpanHelpers.Memmove(ref Unsafe.As(ref managed), ref *unmanaged, (nuint)sizeof(T)); } - // This is the managed fallback body for a JIT intrinsic, so it must keep the shape of the other - // marshaler methods even though it uses none of its parameters. The parameters must not be - // dereferenced here: callers can pass null refs (Unsafe.NullRef), which would throw. + // This is the managed fallback body for an intrinsic. The parameters are used by + // the intrinsic expansion. #pragma warning disable IDE0060 // Remove unused parameter [Intrinsic] private static void FreeCore(ref T managed, byte* unmanaged, ref CleanupWorkListElement? cleanupWorkList) From 68ab5c7efbd9cec59f3eda3dfc21cf972cdb6000 Mon Sep 17 00:00:00 2001 From: Jan Kotas Date: Mon, 3 Aug 2026 09:15:53 -0700 Subject: [PATCH 9/9] Update src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs --- src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs b/src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs index 436c125bc3fe19..a191224204e71d 100644 --- a/src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs +++ b/src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs @@ -1434,7 +1434,7 @@ public static void ConvertToManaged(ref T managed, byte* unmanaged, ref CleanupW SpanHelpers.Memmove(ref Unsafe.As(ref managed), ref *unmanaged, (nuint)sizeof(T)); } - // This is the managed fallback body for an intrinsic. The parameters are used by + // This is the managed fallback body for an intrinsic. The unused parameters are used by // the intrinsic expansion. #pragma warning disable IDE0060 // Remove unused parameter [Intrinsic]