From 0e11ad230119a291b1175a8118eef8303a559de2 Mon Sep 17 00:00:00 2001 From: "Matt Mitchell (.NET) (from Dev Box)" Date: Fri, 10 Jul 2026 09:13:41 -0700 Subject: [PATCH] Tolerate decommissioned package sources during restore (release/9.0) Set RestoreIgnoreFailedSources=true by default so servicing builds don't fail when a transport feed referenced in NuGet.config has been disabled after a release (e.g. dotnet/runtime#129694, the darc-pub-dotnet-emsdk feed). - Default the property in the Arcade SDK's ProjectDefaults.props so it flows to every project's NuGet restore. It is conditional, so repos and command lines can still override it explicitly. - Also pass it on the toolset restore.proj invocation in tools.ps1/tools.sh, where the Arcade SDK props imports are suppressed. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- eng/common/tools.ps1 | 2 +- eng/common/tools.sh | 2 +- .../tools/ProjectDefaults.props | 8 ++++++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/eng/common/tools.ps1 b/eng/common/tools.ps1 index 977a2d4b103..c6a1d6eaec4 100644 --- a/eng/common/tools.ps1 +++ b/eng/common/tools.ps1 @@ -732,7 +732,7 @@ function InitializeToolset() { '' | Set-Content $proj - MSBuild-Core $proj $bl /t:__WriteToolsetLocation /clp:ErrorsOnly`;NoSummary /p:__ToolsetLocationOutputFile=$toolsetLocationFile + MSBuild-Core $proj $bl /t:__WriteToolsetLocation /clp:ErrorsOnly`;NoSummary /p:__ToolsetLocationOutputFile=$toolsetLocationFile /p:RestoreIgnoreFailedSources=true $path = Get-Content $toolsetLocationFile -Encoding UTF8 -TotalCount 1 if (!(Test-Path $path)) { diff --git a/eng/common/tools.sh b/eng/common/tools.sh index 1b296f646c2..62aeb73fe51 100755 --- a/eng/common/tools.sh +++ b/eng/common/tools.sh @@ -430,7 +430,7 @@ function InitializeToolset { fi echo '' > "$proj" - MSBuild-Core "$proj" $bl /t:__WriteToolsetLocation /clp:ErrorsOnly\;NoSummary /p:__ToolsetLocationOutputFile="$toolset_location_file" + MSBuild-Core "$proj" $bl /t:__WriteToolsetLocation /clp:ErrorsOnly\;NoSummary /p:__ToolsetLocationOutputFile="$toolset_location_file" /p:RestoreIgnoreFailedSources=true local toolset_build_proj=`cat "$toolset_location_file"` diff --git a/src/Microsoft.DotNet.Arcade.Sdk/tools/ProjectDefaults.props b/src/Microsoft.DotNet.Arcade.Sdk/tools/ProjectDefaults.props index e443c179b2a..d85f3845531 100644 --- a/src/Microsoft.DotNet.Arcade.Sdk/tools/ProjectDefaults.props +++ b/src/Microsoft.DotNet.Arcade.Sdk/tools/ProjectDefaults.props @@ -55,6 +55,14 @@ {TargetFrameworkDirectory}; {RawFileName}; + + + true