From 6a4e4d27dcd0f6a6f645740d398ef6657a3bfc73 Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Fri, 30 Jan 2026 14:56:24 -0800 Subject: [PATCH] Skip .NET Framework tests on non-Windows platforms (#1226) Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com> --- .github/workflows/ci-build-test.yml | 9 --------- Directory.Build.props | 6 ++++++ .../TestServerWithHosting/TestServerWithHosting.csproj | 2 +- .../ModelContextProtocol.TestServer.csproj | 2 +- .../ModelContextProtocol.Tests.csproj | 2 +- 5 files changed, 9 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci-build-test.yml b/.github/workflows/ci-build-test.yml index 37ee6ab..70e7687 100644 --- a/.github/workflows/ci-build-test.yml +++ b/.github/workflows/ci-build-test.yml @@ -47,15 +47,6 @@ jobs: 10.0.x 9.0.x - # NetFX testing on non-Windows requires mono - - name: 🔧 Setup Mono - if: runner.os == 'Linux' - run: sudo apt-get install -y mono-devel - - - name: 🔧 Setup Mono on macOS - if: runner.os == 'macOS' - run: brew install mono - - name: 🔧 Set up Node.js uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 with: diff --git a/Directory.Build.props b/Directory.Build.props index 390be36..f5cdd3a 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -45,4 +45,10 @@ true + + + + net10.0;net9.0;net8.0 + $(DefaultTestTargetFrameworks);net472 + diff --git a/samples/TestServerWithHosting/TestServerWithHosting.csproj b/samples/TestServerWithHosting/TestServerWithHosting.csproj index 7967395..9eca173 100644 --- a/samples/TestServerWithHosting/TestServerWithHosting.csproj +++ b/samples/TestServerWithHosting/TestServerWithHosting.csproj @@ -2,7 +2,7 @@ Exe - net10.0;net9.0;net8.0;net472 + $(DefaultTestTargetFrameworks) enable enable true diff --git a/tests/ModelContextProtocol.TestServer/ModelContextProtocol.TestServer.csproj b/tests/ModelContextProtocol.TestServer/ModelContextProtocol.TestServer.csproj index c4b39bb..229c57d 100644 --- a/tests/ModelContextProtocol.TestServer/ModelContextProtocol.TestServer.csproj +++ b/tests/ModelContextProtocol.TestServer/ModelContextProtocol.TestServer.csproj @@ -2,7 +2,7 @@ Exe - net10.0;net9.0;net8.0;net472 + $(DefaultTestTargetFrameworks) enable enable TestServer diff --git a/tests/ModelContextProtocol.Tests/ModelContextProtocol.Tests.csproj b/tests/ModelContextProtocol.Tests/ModelContextProtocol.Tests.csproj index 7dafe34..1068e56 100644 --- a/tests/ModelContextProtocol.Tests/ModelContextProtocol.Tests.csproj +++ b/tests/ModelContextProtocol.Tests/ModelContextProtocol.Tests.csproj @@ -2,7 +2,7 @@ Exe - net10.0;net9.0;net8.0;net472 + $(DefaultTestTargetFrameworks) enable enable true