Skip to content

✨ add macos support for test project conditions#163

Merged
gimlichael merged 1 commit into
mainfrom
v10.5.3/mac-fix
Jun 3, 2026
Merged

✨ add macos support for test project conditions#163
gimlichael merged 1 commit into
mainfrom
v10.5.3/mac-fix

Conversation

@gimlichael
Copy link
Copy Markdown
Member

This pull request updates the build configuration to improve platform detection and test project targeting. The main changes are the addition of a property to detect macOS and updating test project conditions to include macOS alongside Linux.

Platform detection improvements:

  • Added a new IsMacOS property in Directory.Build.props to detect when the build is running on macOS.

Test project framework targeting:

  • Updated the test project property group condition in Directory.Build.props so that projects on both Linux and macOS use the same target frameworks (net10.0;net9.0).

@gimlichael gimlichael self-assigned this Jun 3, 2026
@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented Jun 3, 2026

Greptile Summary

This PR extends the MSBuild configuration to recognise macOS as a build platform and applies the same net10.0;net9.0 test-project target-framework set that was previously Linux-only.

  • Adds IsMacOS via $([MSBuild]::IsOSPlatform('OSX')), consistent with how IsLinux and IsWindows are already defined.
  • Updates the test PropertyGroup condition from a Linux-only check to IsLinux OR IsMacOS, making macOS CI runners target the same frameworks as Linux runners.

Confidence Score: 5/5

Safe to merge — the change is a two-line, well-scoped addition that mirrors the existing Linux pattern exactly.

The IsMacOS property uses the standard OSX platform string that MSBuild resolves through RuntimeInformation.IsOSPlatform, consistent with how IsLinux and IsWindows are already set up. The condition update on the test PropertyGroup is a straightforward boolean extension with no risk of interfering with the Windows or source-project property groups.

No files require special attention.

Important Files Changed

Filename Overview
Directory.Build.props Adds IsMacOS property using [MSBuild]::IsOSPlatform('OSX') and expands the test-project TargetFrameworks condition to include macOS alongside Linux.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[MSBuild evaluates Directory.Build.props] --> B{IsTestProject?}
    B -- No --> C[Source / Tooling / Benchmark project groups apply]
    B -- Yes --> D{OS Detection}
    D -- IsLinux == true\nOR IsMacOS == true --> E[TargetFrameworks = net10.0;net9.0]
    D -- IsWindows == true --> F[TargetFrameworks = net10.0;net9.0;net48]
    D -- Neither --> G[TargetFrameworks unset - inherits project default]
    E --> H[Common test settings applied]
    F --> H
    G --> H
Loading

Reviews (1): Last reviewed commit: "✨ add macos support for test project con..." | Re-trigger Greptile

@gimlichael gimlichael merged commit 8847f98 into main Jun 3, 2026
6 checks passed
@gimlichael gimlichael deleted the v10.5.3/mac-fix branch June 3, 2026 23:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant