From 4c1ca373c0c0c0ab0fa260dfdec098db60450b5b Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Thu, 10 Sep 2026 03:49:14 -0700 Subject: [PATCH 1/5] Update .NET 10 SDK and build tooling Update the .NET SDK to 10.0.401, MSBuild.Sdk.Extras to 3.0.44, and SlnGen to 12.0.32. Align CI runners, Windows SDK prerequisites, development containers, and documented build requirements. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- .config/dotnet-tools.json | 4 ++-- .devcontainer/Dockerfile | 15 ++++++++------- .devcontainer/devcontainer.json | 4 +--- .github/workflows/build.yml | 18 ++++++++++++------ Install-WindowsSdk.ps1 | 10 +++++++--- ReadMe.md | 2 +- ToolkitComponent.SampleProject.props | 2 +- ToolkitComponent.SourceProject.props | 2 +- global.json | 4 ++-- 9 files changed, 35 insertions(+), 26 deletions(-) diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index c67b543c..17e8c9df 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -15,10 +15,10 @@ ] }, "microsoft.visualstudio.slngen.tool": { - "version": "12.0.13", + "version": "12.0.32", "commands": [ "slngen" ] } } -} \ No newline at end of file +} diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 6935449f..f5751440 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,5 +1,11 @@ # See https://github.com/devcontainers/images/tree/main/src/dotnet for image choices -FROM mcr.microsoft.com/vscode/devcontainers/dotnet:9.0 +FROM mcr.microsoft.com/devcontainers/dotnet:10.0 + +# Dev container images can lag behind the SDK version pinned by the repository. +COPY global.json /tmp/global.json +RUN curl -fsSL https://dot.net/v1/dotnet-install.sh -o /tmp/dotnet-install.sh \ + && bash /tmp/dotnet-install.sh --jsonfile /tmp/global.json --install-dir /usr/share/dotnet --no-path \ + && rm /tmp/dotnet-install.sh /tmp/global.json # [Choice] Node.js version: none, lts/*, 16, 14, 12, 10 ARG NODE_VERSION="none" @@ -10,12 +16,7 @@ RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/ # && apt-get -y install --no-install-recommends RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ - && apt-get -y install --no-install-recommends ninja-build - -RUN apt-get update && apt-get install -y --no-install-recommends apt-transport-https dirmngr gnupg ca-certificates \ - && apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF \ - && echo "deb https://download.mono-project.com/repo/debian stable-buster main" | tee /etc/apt/sources.list.d/mono-official-stable.list \ - && apt-get update && apt-get -y --no-install-recommends install mono-complete + && apt-get -y install --no-install-recommends ninja-build mono-complete # [Optional] Uncomment this line to install global node packages. # RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g " 2>&1 \ No newline at end of file diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index f616c78f..aeb9467a 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -4,10 +4,8 @@ "name": "C# (.NET)", "build": { "dockerfile": "Dockerfile", + "context": "..", "args": { - // Update 'VARIANT' to pick a .NET Core version: 3.1, 5.0, 6.0 - // Append -bullseye or -focal to pin to an OS version. - "VARIANT": "9.0", // Options "NODE_VERSION": "lts/*" } diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2049b492..711e6c37 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -85,7 +85,7 @@ jobs: # Test job to build the project template project-template: - runs-on: windows-2022 + runs-on: windows-2025-vs2026 env: HEADS_DIRECTORY: tooling/ProjectHeads PROJECT_DIRECTORY: tooling/ProjectTemplate @@ -116,10 +116,16 @@ jobs: if: ${{ env.ENABLE_DIAGNOSTICS == 'true' }} run: dotnet --info - - name: Copy props files to root + - name: Copy props and SDK configuration to root shell: pwsh working-directory: ./ - run: copy ./tooling/.github/workflows/config/* ./ + run: | + copy ./tooling/.github/workflows/config/* ./ + copy ./tooling/global.json ./ + + - name: Install Windows SDKs + shell: pwsh + run: ./tooling/Install-WindowsSdk.ps1 - name: Add msbuild to PATH uses: microsoft/setup-msbuild@v2 @@ -135,7 +141,7 @@ jobs: # Test job to build a single experiment to ensure our changes work for both our main types of solutions at the moment new-experiment: - runs-on: windows-2022 + runs-on: windows-2025-vs2026 strategy: fail-fast: false # prevent one matrix pipeline from being cancelled if one fails, we want them all to run to completion. @@ -187,6 +193,7 @@ jobs: working-directory: ./ run: | copy ./tooling/.github/workflows/config/* ./ + copy ./tooling/global.json ./ mkdir ./.config copy ./tooling/.config/dotnet-tools.json ./.config/dotnet-tools.json mkdir ./components @@ -273,6 +280,7 @@ jobs: working-directory: ./ run: | copy ./tooling/.github/workflows/config/* ./ + copy ./tooling/global.json ./ mkdir ./.config copy ./tooling/.config/dotnet-tools.json ./.config/dotnet-tools.json mkdir ./components @@ -309,5 +317,3 @@ jobs: with: name: linux-logs path: ./**/*.*log - - diff --git a/Install-WindowsSdk.ps1 b/Install-WindowsSdk.ps1 index afeb2db2..31b32e40 100644 --- a/Install-WindowsSdk.ps1 +++ b/Install-WindowsSdk.ps1 @@ -1,10 +1,14 @@ +$ErrorActionPreference = "Stop" $WinSdkTempDir = "C:\WinSdkTemp\" $WinSdkSetupExe = "C:\WinSdkTemp\" + "WinSdkSetup.exe" -mkdir $WinSdkTempDir +New-Item -ItemType Directory -Path $WinSdkTempDir -Force | Out-Null $client = [System.Net.WebClient]::new() -$client.DownloadFile("https://go.microsoft.com/fwlink/p/?linkid=870807", $WinSdkSetupExe) +$client.DownloadFile("https://go.microsoft.com/fwlink/?linkid=2311805", $WinSdkSetupExe) -Start-Process -Wait $WinSdkSetupExe "/features OptionId.UWPCpp /q" \ No newline at end of file +$installer = Start-Process -Wait -PassThru $WinSdkSetupExe "/features OptionId.UWPManaged OptionId.UWPCpp /q /norestart" +if ($installer.ExitCode -notin @(0, 3010)) { + throw "Windows SDK 19041 installation failed with exit code $($installer.ExitCode)." +} \ No newline at end of file diff --git a/ReadMe.md b/ReadMe.md index a8b0ee4f..06a1687a 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -8,7 +8,7 @@ This repository contains the tooling infrastructure for other Community Toolkit ## Build Requirements - Visual Studio 2026 (UWP & Desktop Workloads for .NET) -- .NET 9 SDK +- .NET 10 SDK (version specified in `global.json`) - Windows App SDK - Windows SDK 26100 diff --git a/ToolkitComponent.SampleProject.props b/ToolkitComponent.SampleProject.props index 43095c9c..9bc7df84 100644 --- a/ToolkitComponent.SampleProject.props +++ b/ToolkitComponent.SampleProject.props @@ -6,7 +6,7 @@ - + diff --git a/ToolkitComponent.SourceProject.props b/ToolkitComponent.SourceProject.props index d112280a..e190c493 100644 --- a/ToolkitComponent.SourceProject.props +++ b/ToolkitComponent.SourceProject.props @@ -18,7 +18,7 @@ $(PackageIdPrefix).$(PackageIdVariant).$(ToolkitComponentName) - + true diff --git a/global.json b/global.json index cfa58f62..5d4b9f49 100644 --- a/global.json +++ b/global.json @@ -1,10 +1,10 @@ { "sdk": { - "version": "9.0.310", + "version": "10.0.401", "rollForward": "latestFeature" }, "msbuild-sdks": { - "MSBuild.Sdk.Extras":"3.0.23" + "MSBuild.Sdk.Extras":"3.0.44" } } From 330998f6dbdc9da9d5e8219f8e576a2c83016bb6 Mon Sep 17 00:00:00 2001 From: Avishai Dernis Date: Sat, 11 Apr 2026 00:39:32 +0300 Subject: [PATCH 2/5] Updated SlnGen to 12.0.32 (cherry picked from commit 5e06a74f50b2bc5ca2cba5f4994998fc0d89edc9) Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> From 1333901aa996518f5a4af6262eb4ac1cca5e7425 Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Fri, 11 Sep 2026 16:05:57 -0700 Subject: [PATCH 3/5] Address Windows runner review feedback Use the standard windows-2025 label for native CI jobs. Start the pagefile at 8 GB while preserving its 32 GB maximum so SDK installation has sufficient disk space. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- .github/workflows/build.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 711e6c37..f2ba6dae 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -85,7 +85,7 @@ jobs: # Test job to build the project template project-template: - runs-on: windows-2025-vs2026 + runs-on: windows-2025 env: HEADS_DIRECTORY: tooling/ProjectHeads PROJECT_DIRECTORY: tooling/ProjectTemplate @@ -94,7 +94,8 @@ jobs: - name: Configure Pagefile uses: al-cheb/configure-pagefile-action@v1.4 with: - minimum-size: 32GB + # Leave room for SDK installation while allowing the pagefile to grow during builds. + minimum-size: 8GB maximum-size: 32GB disk-root: "C:" @@ -141,7 +142,7 @@ jobs: # Test job to build a single experiment to ensure our changes work for both our main types of solutions at the moment new-experiment: - runs-on: windows-2025-vs2026 + runs-on: windows-2025 strategy: fail-fast: false # prevent one matrix pipeline from being cancelled if one fails, we want them all to run to completion. @@ -166,7 +167,7 @@ jobs: - name: Configure Pagefile uses: al-cheb/configure-pagefile-action@v1.4 with: - minimum-size: 32GB + minimum-size: 8GB maximum-size: 32GB disk-root: "C:" From 6c8f3e3b5e72ee9539c05bb9dd335e271bcebac9 Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Fri, 11 Sep 2026 16:08:31 -0700 Subject: [PATCH 4/5] Leave CI SDK provisioning to prerequisite changes Remove the added Windows SDK installer changes and project-template installation step. Restore the original pagefile settings while retaining the reviewed windows-2025 labels and tool version updates. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- .github/workflows/build.yml | 9 ++------- Install-WindowsSdk.ps1 | 10 +++------- 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f2ba6dae..53d79c30 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -94,8 +94,7 @@ jobs: - name: Configure Pagefile uses: al-cheb/configure-pagefile-action@v1.4 with: - # Leave room for SDK installation while allowing the pagefile to grow during builds. - minimum-size: 8GB + minimum-size: 32GB maximum-size: 32GB disk-root: "C:" @@ -124,10 +123,6 @@ jobs: copy ./tooling/.github/workflows/config/* ./ copy ./tooling/global.json ./ - - name: Install Windows SDKs - shell: pwsh - run: ./tooling/Install-WindowsSdk.ps1 - - name: Add msbuild to PATH uses: microsoft/setup-msbuild@v2 @@ -167,7 +162,7 @@ jobs: - name: Configure Pagefile uses: al-cheb/configure-pagefile-action@v1.4 with: - minimum-size: 8GB + minimum-size: 32GB maximum-size: 32GB disk-root: "C:" diff --git a/Install-WindowsSdk.ps1 b/Install-WindowsSdk.ps1 index 31b32e40..afeb2db2 100644 --- a/Install-WindowsSdk.ps1 +++ b/Install-WindowsSdk.ps1 @@ -1,14 +1,10 @@ -$ErrorActionPreference = "Stop" $WinSdkTempDir = "C:\WinSdkTemp\" $WinSdkSetupExe = "C:\WinSdkTemp\" + "WinSdkSetup.exe" -New-Item -ItemType Directory -Path $WinSdkTempDir -Force | Out-Null +mkdir $WinSdkTempDir $client = [System.Net.WebClient]::new() -$client.DownloadFile("https://go.microsoft.com/fwlink/?linkid=2311805", $WinSdkSetupExe) +$client.DownloadFile("https://go.microsoft.com/fwlink/p/?linkid=870807", $WinSdkSetupExe) -$installer = Start-Process -Wait -PassThru $WinSdkSetupExe "/features OptionId.UWPManaged OptionId.UWPCpp /q /norestart" -if ($installer.ExitCode -notin @(0, 3010)) { - throw "Windows SDK 19041 installation failed with exit code $($installer.ExitCode)." -} \ No newline at end of file +Start-Process -Wait $WinSdkSetupExe "/features OptionId.UWPCpp /q" \ No newline at end of file From 0b619e9e9f10222b5857dc3a0bedb3870ee901de Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Fri, 11 Sep 2026 16:26:28 -0700 Subject: [PATCH 5/5] Use larger Windows 2025 CI runners Switch all Windows CI jobs to windows-2025-large to provide more disk space without changing SDK installation or pagefile settings. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- .github/workflows/build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 53d79c30..80543cae 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -25,7 +25,7 @@ env: jobs: # This workflow contains a single job called "Xaml-Style-Check" Xaml-Style-Check: - runs-on: windows-2025 + runs-on: windows-2025-large # Steps represent a sequence of tasks that will be executed as part of the job steps: @@ -85,7 +85,7 @@ jobs: # Test job to build the project template project-template: - runs-on: windows-2025 + runs-on: windows-2025-large env: HEADS_DIRECTORY: tooling/ProjectHeads PROJECT_DIRECTORY: tooling/ProjectTemplate @@ -137,7 +137,7 @@ jobs: # Test job to build a single experiment to ensure our changes work for both our main types of solutions at the moment new-experiment: - runs-on: windows-2025 + runs-on: windows-2025-large strategy: fail-fast: false # prevent one matrix pipeline from being cancelled if one fails, we want them all to run to completion.