From ed8da2e28e01f27545c59e7b02adbe239fb76f5c Mon Sep 17 00:00:00 2001 From: Christian Helle Date: Thu, 22 Jan 2026 08:58:13 +0100 Subject: [PATCH 1/6] Add support for systems that only have .NET 10.0 installed --- src/Refitter.MSBuild/Refitter.MSBuild.csproj | 1 + src/Refitter.MSBuild/RefitterGenerateTask.cs | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/Refitter.MSBuild/Refitter.MSBuild.csproj b/src/Refitter.MSBuild/Refitter.MSBuild.csproj index ff1c46985..e895fd3ed 100644 --- a/src/Refitter.MSBuild/Refitter.MSBuild.csproj +++ b/src/Refitter.MSBuild/Refitter.MSBuild.csproj @@ -26,6 +26,7 @@ + diff --git a/src/Refitter.MSBuild/RefitterGenerateTask.cs b/src/Refitter.MSBuild/RefitterGenerateTask.cs index 74ddd23d1..9c163e897 100644 --- a/src/Refitter.MSBuild/RefitterGenerateTask.cs +++ b/src/Refitter.MSBuild/RefitterGenerateTask.cs @@ -69,7 +69,13 @@ private List StartProcess(string file) var refitterDll = $"{packageFolder}{separator}..{separator}net8.0{separator}refitter.dll"; List installedRuntimes = GetInstalledDotnetRuntimes(); - if (installedRuntimes.Any(r => r.StartsWith("Microsoft.NETCore.App 9."))) + if (installedRuntimes.Any(r => r.StartsWith("Microsoft.NETCore.App 10."))) + { + // Use .NET 10 version if available + refitterDll = $"{packageFolder}{separator}..{separator}net10.0{separator}refitter.dll"; + TryLogCommandLine("Detected .NET 10 runtime. Using .NET 10 version of Refitter."); + } + else if (installedRuntimes.Any(r => r.StartsWith("Microsoft.NETCore.App 9."))) { // Use .NET 9 version if available refitterDll = $"{packageFolder}{separator}..{separator}net9.0{separator}refitter.dll"; From 7f48577338b6c541d51b6c032241366d0aa930f7 Mon Sep 17 00:00:00 2001 From: Christian Helle Date: Thu, 22 Jan 2026 08:58:37 +0100 Subject: [PATCH 2/6] Update MSBuild test project to target .NET 10 --- test/MSBuild/Refitter.MSBuild.Tests.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/MSBuild/Refitter.MSBuild.Tests.csproj b/test/MSBuild/Refitter.MSBuild.Tests.csproj index 7b8ee93e8..a574258cc 100644 --- a/test/MSBuild/Refitter.MSBuild.Tests.csproj +++ b/test/MSBuild/Refitter.MSBuild.Tests.csproj @@ -2,7 +2,7 @@ Exe - net8.0 + net10.0 enable enable true From 9c1a47863f9bf0efd9051042f01c74e08806dc00 Mon Sep 17 00:00:00 2001 From: Christian Helle Date: Thu, 22 Jan 2026 15:21:41 +0100 Subject: [PATCH 3/6] Remove setup .NET in msbuild workflow --- .github/workflows/msbuild.yml | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/.github/workflows/msbuild.yml b/.github/workflows/msbuild.yml index 04799a492..4906426d8 100644 --- a/.github/workflows/msbuild.yml +++ b/.github/workflows/msbuild.yml @@ -23,15 +23,9 @@ jobs: build: name: ๐Ÿ‘Œ Verify build runs-on: windows-latest - steps: + steps: - name: ๐Ÿ›’ Checkout repository uses: actions/checkout@v6 - - uses: actions/setup-dotnet@v5 - with: - dotnet-version: | - 8.0.x - 9.0.x - 10.0.x - name: ๐Ÿ› ๏ธ Prepare working-directory: test/MSBuild run: | @@ -46,7 +40,7 @@ jobs: run: dotnet build -v d -filelogger - name: ๐Ÿงช Build Output working-directory: test/MSBuild - run: cat msbuild.log + run: cat msbuild.log - name: ๐Ÿ—ณ๏ธ Upload uses: actions/upload-artifact@v6 with: From 586b63c15c882c0bc206d26c026db7e8790fb9ce Mon Sep 17 00:00:00 2001 From: Christian Helle Date: Thu, 22 Jan 2026 15:30:26 +0100 Subject: [PATCH 4/6] Update packages in MSBuild test project --- test/MSBuild/Refitter.MSBuild.Tests.csproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/MSBuild/Refitter.MSBuild.Tests.csproj b/test/MSBuild/Refitter.MSBuild.Tests.csproj index a574258cc..a2d3ae02f 100644 --- a/test/MSBuild/Refitter.MSBuild.Tests.csproj +++ b/test/MSBuild/Refitter.MSBuild.Tests.csproj @@ -9,9 +9,9 @@ - + - + From dea273c418717abb98f78717553389cc5a94d216 Mon Sep 17 00:00:00 2001 From: Christian Helle Date: Thu, 22 Jan 2026 15:59:02 +0100 Subject: [PATCH 5/6] Remove unused dependencies in MSBuild test project --- test/MSBuild/Refitter.MSBuild.Tests.csproj | 3 --- 1 file changed, 3 deletions(-) diff --git a/test/MSBuild/Refitter.MSBuild.Tests.csproj b/test/MSBuild/Refitter.MSBuild.Tests.csproj index a2d3ae02f..ee2ebf24a 100644 --- a/test/MSBuild/Refitter.MSBuild.Tests.csproj +++ b/test/MSBuild/Refitter.MSBuild.Tests.csproj @@ -9,10 +9,7 @@ - - - From aa833f3610259750c2c527c12387db7fc71b2312 Mon Sep 17 00:00:00 2001 From: Christian Helle Date: Thu, 22 Jan 2026 15:59:16 +0100 Subject: [PATCH 6/6] Update build.ps1 to use release configuration --- test/MSBuild/build.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/MSBuild/build.ps1 b/test/MSBuild/build.ps1 index d6c29e5d2..0addce726 100644 --- a/test/MSBuild/build.ps1 +++ b/test/MSBuild/build.ps1 @@ -12,6 +12,6 @@ dotnet pack -c release ../../src/Refitter.MSBuild/Refitter.MSBuild.csproj -o . dotnet add package .\Refitter.MSBuild.1.0.0.nupkg --source . dotnet restore dotnet add package Refitter.MSBuild --source . -dotnet run -v d -filelogger +dotnet run -v d -filelogger -c Release dotnet remove package Refitter.MSBuild -Remove-Item Refitter.MSBuild.*.nupkg -Force \ No newline at end of file +Remove-Item Refitter.MSBuild.*.nupkg -Force