Repository navigation
Description
Build Information
Build: https://dev.azure.com/dnceng-public/public/_build/results?buildId=1545024
Build error leg or test failing: NativeAOT Compliance.Tests — GB18030.Tests.RegexTests.UnicodeCategory_ExclusionAsync
Pipeline: runtime-nativeaot-outerloop (definition 265), branch main. The GB18030.Tests.RegexTests cases fail across the NativeAOT Compliance.Tests work item in source build 1545024 and persist into follow-up build 1545347.
Under NativeAOT the Regex tests attempt to load Microsoft.CodeAnalysis.CSharp (used by the Regex source-generator compilation path in the test) and fail with System.IO.FileNotFoundException, thrown from the NativeAOT type loader. The failure affects every Regex engine variant (Interpreter, Compiled, NonBacktracking).
Error Details
[FAIL] GB18030.Tests.RegexTests.UnicodeCategory_ExclusionAsync(engine: Interpreter, culture: CultureInfo { })
System.IO.FileNotFoundException : Could not find file 'Microsoft.CodeAnalysis.CSharp'.
at Internal.Runtime.TypeLoaderExceptionHelper.CreateFileNotFoundException(ExceptionStringID, String) in /_/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/TypeLoaderExceptionHelper.cs:line 49
Error Message
{
"ErrorMessage": [
"[FAIL] GB18030.Tests.RegexTests.UnicodeCategory_ExclusionAsync",
"System.IO.FileNotFoundException : Could not find file 'Microsoft.CodeAnalysis.CSharp'."
],
"ErrorPattern": "",
"BuildRetry": false,
"ExcludeConsoleLog": false
}First build it occurred
Observed in source build 1545024 (2026-08-08) and again in follow-up build 1545347 (2026-08-08) — at least two distinct builds.
Duplicate search
Searched open and closed issues/KBEs for GB18030.Tests.RegexTests and Could not find file 'Microsoft.CodeAnalysis.CSharp': no existing KBE matches. No open or merged PR references this NativeAOT signature.
Filed by ci-failure-scan (detection only). ci-failure-fix walks open [ci-scan] KBEs and either opens a small fix PR or comments here to loop in owners — it never disables the test.
Note
This issue was generated by the ci-failure-scan GitHub Copilot agentic workflow.
Warning
Firewall blocked 1 domain
The following domain was blocked by the firewall during workflow execution:
awmgmcpg
To allow these domains, add them to the
network.allowedlist in your workflow frontmatter:
network:
allowed:
- defaults
- "awmgmcpg"See Network Configuration for more information.
Generated by CI Outer-Loop Failure Scanner · 719.9 AIC · ⌖ 16.6 AIC · ⊞ 18.3K · ◷
Report
Summary
| 24-Hour Hit Count | 7-Day Hit Count | 1-Month Count |
|---|---|---|
| 4 | 15 | 15 |
Known issue validation
Build: 🔎 https://dev.azure.com/dnceng-public/public/_build/results?buildId=1545024
Error message validated: [[FAIL] GB18030.Tests.RegexTests.UnicodeCategory_ExclusionAsync System.IO.FileNotFoundException : Could not find file 'Microsoft.CodeAnalysis.CSharp'.]
Result validation: ✅ Known issue matched with the provided build.
Validation performed at: 8/10/2026 2:32:31 PM UTC
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsNo status
Activity
dotnet-policy-service commentedon Aug 10, 2026
Tagging subscribers to this area: @agocke, @dotnet/ilc-contrib
See info in area-owners.md if you want to be subscribed.
github-actions commentedon Aug 10, 2026
Workflow artifact: ci-fix
Artifact kind: handoff
Linked KBE: #132046
Note
AI/Copilot-generated triage note.
This Known Build Error has no producible automated code change (reason: non-code/infra failure — NativeAOT test-project publish/trimming wiring, where the only in-bounds product change would be a build-wiring change I cannot build-validate in this environment, and disabling the test is not allowed), so I could not open even a best-effort PR I could stand behind. Looping in owners so it can be fixed forward rather than muted.
Root cause (best analysis)
On the
runtime-nativeaot-outerloop(def 265) NativeAOT Compliance.Tests work item, everyGB18030.Tests.RegexTestscase fails — including theInterpreterengine variant, which never invokes the Roslyn source-generator path — with:The
Compliance.Testsproject links the shared Regex test helpers:src/libraries/Common/tests/ComplianceTests/Compliance.Tests.csprojcompilesSystem.Text.RegularExpressions/tests/FunctionalTests/RegexGeneratorHelper.netcoreapp.csand adds<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" ... />.Microsoft.CodeAnalysis.CSharptypes, so the assembly is a hard reference of the test even though, on NativeAOT, theSourceGeneratedengine is never enumerated (RegexHelpers.AvailableEnginesgates it behindPlatformDetection.IsReflectionEmitSupported, which isfalseunder NativeAOT).Under NativeAOT the Roslyn assembly is not published/resolvable, so the type loader throws while the test type is brought up — failing all engine variants of
RegexTests, not justSourceGenerated. TheGB18030Compliance tests were newly added in #118075 (merged 2026-08-07); the failure first appears on the next NativeAOT outerloop build (1545024, 2026-08-08), which is consistent with the new project not yet being wired for the NativeAOT publish path.A fix would likely condition the
Microsoft.CodeAnalysis.CSharp.Workspacespackage reference and theRegexGeneratorHelper.netcoreapp.cscompile item so the Roslyn dependency is only pulled in when the source-generator engine can actually run (i.e. not for the NativeAOT/mobile publish), or otherwise ensure the Roslyn assemblies are published alongside the NativeAOT test app. Either is a build-wiring decision that needs owner review and a real NativeAOT publish run to validate — not something I can confidently land here without muting the test (which this workflow must not do).Evidence
GB18030Compliance tests, merged 2026-08-07)Suggested reviewers / area contacts
@dacantu(added the Compliance.Tests project in Add Compliance tests for GB18030-2022 #118075)area-NativeAOT-coreclr):@agocke,@dotnet/ilc-contribA fix would most likely live in
Compliance.Tests.csproj: gate the RoslynPackageReference/RegexGeneratorHelper.netcoreapp.cscompile behind the same condition that determines whether the source-generated Regex engine can run, or publish the Roslyn assemblies for the NativeAOT test app.Filed by
ci-failure-fix, which attempts validated fixes for[ci-scan]Known Build Errors and otherwise loops in owners. Comment here or on the workflow file to suggest changes;ci-failure-scan-feedbackreads in-scope feedback daily and opens (or updates) a PR with prompt edits.Warning
Firewall blocked 1 domain
The following domain was blocked by the firewall during workflow execution:
awmgmcpgSee Network Configuration for more information.
dotnet-policy-service commentedon Aug 10, 2026
Tagging subscribers to this area: @dotnet/area-meta
See info in area-owners.md if you want to be subscribed.
jkotas commentedon Aug 10, 2026
New tests introduced in #118075
@jozkee You have disabled the trim and aot analyzers for this project https://github.com/dotnet/runtime/pull/118075/changes#diff-bfa2579e42b9a3ee7ca76e23b3703fae9ebd032546d227bf4b2ff69af1b9af15R8-R9 . We try to minimize libraries tests that are incompatible with trimming and aot since it reduces our test coverage. The tests that are incompatible with trimming and aot have to be disabled on trimming and aot test configurations.
Can you please refactor these tests to allow clean separation of trim and aot incompatible tests?
[-][ci-scan] Test failure: GB18030.Tests.RegexTests fails with FileNotFoundException 'Microsoft.CodeAnalysis.CSharp' on NativeAOT[/-][+][ci-scan] Test failure: GB18030.Tests.RegexTests are trim and AOT incompatible[/+]Move GB18030 tests to feature test projects (#132112)