Skip to content

Commit 57de0aa

Browse files
Copilotstephentoub
andcommitted
Skip .NET Framework tests on non-Windows platforms
- Configure TargetFrameworks to conditionally include net472 only on Windows - Remove mono setup steps from CI workflow Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>
1 parent 030b4bd commit 57de0aa

4 files changed

Lines changed: 6 additions & 12 deletions

File tree

.github/workflows/ci-build-test.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,6 @@ jobs:
4747
10.0.x
4848
9.0.x
4949
50-
# NetFX testing on non-Windows requires mono
51-
- name: 🔧 Setup Mono
52-
if: runner.os == 'Linux'
53-
run: sudo apt-get install -y mono-devel
54-
55-
- name: 🔧 Setup Mono on macOS
56-
if: runner.os == 'macOS'
57-
run: brew install mono
58-
5950
- name: 🔧 Set up Node.js
6051
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
6152
with:

samples/TestServerWithHosting/TestServerWithHosting.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFrameworks>net10.0;net9.0;net8.0;net472</TargetFrameworks>
5+
<TargetFrameworks>net10.0;net9.0;net8.0</TargetFrameworks>
6+
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('Windows'))">$(TargetFrameworks);net472</TargetFrameworks>
67
<ImplicitUsings>enable</ImplicitUsings>
78
<Nullable>enable</Nullable>
89
<PublishAot Condition="'$(TargetFramework)' == 'net9.0'">true</PublishAot>

tests/ModelContextProtocol.TestServer/ModelContextProtocol.TestServer.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFrameworks>net10.0;net9.0;net8.0;net472</TargetFrameworks>
5+
<TargetFrameworks>net10.0;net9.0;net8.0</TargetFrameworks>
6+
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('Windows'))">$(TargetFrameworks);net472</TargetFrameworks>
67
<ImplicitUsings>enable</ImplicitUsings>
78
<Nullable>enable</Nullable>
89
<AssemblyName>TestServer</AssemblyName>

tests/ModelContextProtocol.Tests/ModelContextProtocol.Tests.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFrameworks>net10.0;net9.0;net8.0;net472</TargetFrameworks>
5+
<TargetFrameworks>net10.0;net9.0;net8.0</TargetFrameworks>
6+
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('Windows'))">$(TargetFrameworks);net472</TargetFrameworks>
67
<ImplicitUsings>enable</ImplicitUsings>
78
<Nullable>enable</Nullable>
89

0 commit comments

Comments
 (0)