From 7f0dcce0432c9d6d5107514aae0f69371fc1b5b3 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 a06513a5940..d89aa48781b 100644 --- a/eng/common/tools.ps1 +++ b/eng/common/tools.ps1 @@ -727,7 +727,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 01b09b65796..c412703d1ba 100755 --- a/eng/common/tools.sh +++ b/eng/common/tools.sh @@ -410,7 +410,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 08937abd374..b4dc5b5006c 100644 --- a/src/Microsoft.DotNet.Arcade.Sdk/tools/ProjectDefaults.props +++ b/src/Microsoft.DotNet.Arcade.Sdk/tools/ProjectDefaults.props @@ -52,6 +52,14 @@ {TargetFrameworkDirectory}; {RawFileName}; + + + true