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:
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";
diff --git a/test/MSBuild/Refitter.MSBuild.Tests.csproj b/test/MSBuild/Refitter.MSBuild.Tests.csproj
index 7b8ee93e8..ee2ebf24a 100644
--- a/test/MSBuild/Refitter.MSBuild.Tests.csproj
+++ b/test/MSBuild/Refitter.MSBuild.Tests.csproj
@@ -2,17 +2,14 @@
Exe
- net8.0
+ net10.0
enable
enable
true
-
-
-
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