From 6098cc760ba8f3f923a2646cd0f9e67b825ece67 Mon Sep 17 00:00:00 2001 From: Todd Anderson Date: Thu, 24 Sep 2026 13:19:58 -0400 Subject: [PATCH] ci: pin docfx and isolate .NET SDKs in the client release build The client release docs step failed with NETSDK1147: docfx resolves MSBuild from the highest SDK installed on the runner image (currently 10.0.400), whose band has no mobile workloads installed. docfx 2.80.1 (released 2026-09-18, picked up automatically because the tool install floated) turned that previously-tolerated restore failure into a fatal one (dotnet/docfx#11146). Isolating DOTNET_INSTALL_DIR keeps only the SDK bands this workflow installs (6/7/8) visible, so docfx resolves the workload-provisioned 8.x band. Pinning docfx removes the floating input. --- .github/actions/build-docs/action.yml | 4 +++- .github/workflows/release-sdk-client.yml | 5 +++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/actions/build-docs/action.yml b/.github/actions/build-docs/action.yml index 210f1fde0..e5953acfa 100644 --- a/.github/actions/build-docs/action.yml +++ b/.github/actions/build-docs/action.yml @@ -14,7 +14,9 @@ runs: dotnet-version: 8.0 - name: Install docfx shell: bash - run: dotnet tool update -g docfx + # Pinned so docfx upgrades are deliberate; 2.80+ fails fast when project restore + # fails (dotnet/docfx#11146) instead of silently generating from stale assemblies. + run: dotnet tool update -g docfx --version 2.80.1 # Note: in the docfx.json file, the 'Configuration' property is set to Debug so that we don't require # signing to happen just to build docs. diff --git a/.github/workflows/release-sdk-client.yml b/.github/workflows/release-sdk-client.yml index c7f91a568..d2c54af2b 100644 --- a/.github/workflows/release-sdk-client.yml +++ b/.github/workflows/release-sdk-client.yml @@ -21,6 +21,11 @@ jobs: permissions: id-token: write contents: write + env: + # Isolate dotnet installs from the SDKs preinstalled on the runner image, so tools + # that resolve the highest available SDK (docfx via MSBuildLocator) cannot land on + # an SDK band that has no mobile workloads installed. + DOTNET_INSTALL_DIR: ${{ runner.temp }}/dotnet steps: - uses: actions/checkout@v4 with: