Skip to content

Fix build break in System.Net.Security TestConfiguration after OpenBSD port (#129479)#129587

Closed
lewing wants to merge 1 commit into
dotnet:mainfrom
lewing:fix/openbsd-testconfig-using
Closed

Fix build break in System.Net.Security TestConfiguration after OpenBSD port (#129479)#129587
lewing wants to merge 1 commit into
dotnet:mainfrom
lewing:fix/openbsd-testconfig-using

Conversation

@lewing

@lewing lewing commented Jun 18, 2026

Copy link
Copy Markdown
Member

Problem

PR #129479 (Port System.Net.Security to OpenBSD) merged to main on 2026-06-18 and reintroduced uses of RuntimeInformation.IsOSPlatform(OSPlatform.Create("OPENBSD")) in src/libraries/System.Net.Security/tests/FunctionalTests/TestConfiguration.cs (lines 29-30) without adding the corresponding using System.Runtime.InteropServices; directive.

The using had been removed previously because #124555 (Remove Windows 7 support code from System.Net.Security) had cleaned up the only references that needed it.

As a result, main HEAD currently fails to build with:

TestConfiguration.cs(29,158): error CS0103: The name 'RuntimeInformation' does not exist in the current context
TestConfiguration.cs(29,190): error CS0103: The name 'OSPlatform' does not exist in the current context
TestConfiguration.cs(30,158): error CS0103: The name 'RuntimeInformation' does not exist in the current context
TestConfiguration.cs(30,190): error CS0103: The name 'OSPlatform' does not exist in the current context

This breaks every open PR's CI as soon as it merges in the latest main (e.g. observed on the codeflow PR #129454 across 21 build legs).

#129479's own CI had these same 4 errors prior to merge (build 1467260), but the PR was admin-merged.

Fix

Add using System.Runtime.InteropServices; to TestConfiguration.cs. One-line fix.

Note

This comment was AI/Copilot-generated.

PR dotnet#129479 (Port System.Net.Security to OpenBSD) added
RuntimeInformation.IsOSPlatform(OSPlatform.Create("OPENBSD")) calls to
TestConfiguration.cs without adding the using directive for
System.Runtime.InteropServices, breaking the build on main and on every
open PR with CS0103 'RuntimeInformation' / 'OSPlatform' does not exist.

Add the missing using directive to unblock CI.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @dotnet/ncl, @bartonjs, @vcsjones
See info in area-owners.md if you want to be subscribed.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes a build break in System.Net.Security functional tests by restoring the missing System.Runtime.InteropServices using needed for RuntimeInformation / OSPlatform references in TestConfiguration.

Changes:

  • Add using System.Runtime.InteropServices; to TestConfiguration.cs so OpenBSD platform checks compile.

@am11

am11 commented Jun 18, 2026

Copy link
Copy Markdown
Member

Dup of #129579.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants