From 1bed449e9c8fcc14ce006112f7761fe5dfc96773 Mon Sep 17 00:00:00 2001 From: Dmitry Kropachev Date: Fri, 20 Feb 2026 11:24:59 -0400 Subject: [PATCH] Use global.json for SDK version in CI workflows CI jobs were using a runner-preinstalled .NET SDK 10.0.x instead of the intended 9.0.x because the setup-dotnet action only installed the target framework runtime without the SDK version specified in global.json. This caused build race conditions (MSB4018 GenerateDepsFile IOException) due to behavioral differences in the newer SDK. Switch all workflows to use global-json-file parameter so the SDK version is always read from global.json, keeping a single source of truth. --- .github/workflows/main.yml | 5 +++-- .github/workflows/publish.yml | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 354912424..9b1ea8bb2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -45,7 +45,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v5 with: - dotnet-version: '9.0.x' + global-json-file: global.json - name: Run dotnet format (checks formatting) run: make check @@ -80,9 +80,10 @@ jobs: - name: Checkout repository uses: actions/checkout@v6 - - name: Setup .NET ${{ matrix.dotnet-version }} + - name: Setup .NET uses: actions/setup-dotnet@v5 with: + global-json-file: global.json dotnet-version: ${{ matrix.dotnet-version }} - name: Set up JDK 8 diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index abb3275e0..936f9f036 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -41,7 +41,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v5 with: - dotnet-version: '9.0.x' + global-json-file: global.json - name: Publish to NuGet (Dry Run) if: ${{ inputs.dry-run == true }}