Repository navigation
Fix Mono detection in TestPlatformHelper - #66483
Merged
Merged
Conversation
Fix Mono detection
Member
|
No need, |
Contributor
Author
|
@wtgodbe IsMono is still used, see FrameworkSkipConditionAttribute.cs#L35-L38, which gates 48 tests marked [FrameworkSkipCondition(RuntimeFrameworks.Mono)]. On .NET 6+, Mono.Runtime isn't present (TestPlatformHelper.cs#L11-L12), so detection fails and those tests run instead of being skipped. We see this on s390x Mono CI, e.g. DefaultObjectValidatorTests.cs#L574-L576 failed when it should have been skipped. I understand aspnetcore's official CI doesn't run on Mono, but we maintain our own downstream CI on s390x/ppc64le with the mono-based .NET runtime |
wtgodbe
approved these changes
Jun 5, 2026
Open
3 tasks
BrennanConroy
approved these changes
Jun 23, 2026
wtgodbe
approved these changes
Jun 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix Mono detection in TestPlatformHelper
Summary
Fixes TestPlatformHelper.IsMono to detect modern Mono runtime (.NET 6+).
Problem
IsMono only checked for Mono.Runtime type, which exists in old Mono but not modern Mono (.NET 6+). This caused tests marked with [FrameworkSkipCondition(RuntimeFrameworks.Mono)] to run on Mono when they should have been skipped.
cc: @giritrivedi