Skip to content

Fix .NET Standard common name matching build - #216

Merged
elantiguamsft merged 1 commit into
mainfrom
user/fix-netstandard-common-name-contains
Sep 24, 2026
Merged

elantiguamsft merged 1 commit into
mainfrom
user/fix-netstandard-common-name-contains

Conversation

@JeromySt

Copy link
Copy Markdown
Member

Summary

  • replace string.Contains(string, StringComparison) with the .NET Standard 2.0-compatible IndexOf overload
  • preserve ordinal, case-sensitive signtool.exe /n substring semantics
  • add positive substring regression coverage

Root cause

The Contains overload used by X509CommonNameValidator is not available in the .NET Standard 2.0 reference surface used by the zipped-source release build, producing CS1501.

Validation

  • CoseSign1.Certificates Release build targeting netstandard2: passed
  • full Release solution build under .NET SDK 8.0.425: passed
  • CoseSign1.Certificates.Tests: 147 passed, 0 failed

Follow-up to #215 and the 1.7.9 release build failure.

Use the .NET Standard 2.0-compatible IndexOf overload while preserving ordinal substring matching semantics. Add positive substring regression coverage.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@elantiguamsft
elantiguamsft merged commit 1579af3 into main Sep 24, 2026
12 checks passed
@elantiguamsft
elantiguamsft deleted the user/fix-netstandard-common-name-contains branch September 24, 2026 20:56
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.

4 participants