Skip to content

[ci-scan] Build break: CS0246 InvalidCSharp not found in ByRefLike/Validate.csproj (minifullaot) #128767

Description

@github-actions

Build Information

Build: https://dev.azure.com/dnceng-public/public/_build/results?buildId=1440191
Build error leg or test failing: linux-x64 Release AllSubsets_Mono_MiniFullAot_RuntimeTests minifullaot / Build Tests

Error Details

src/tests/Loader/classloader/generics/ByRefLike/Validate.cs(73,20): error CS0246: The type or namespace name 'InvalidCSharp' could not be found (are you missing a using directive or an assembly reference?) [src/tests/Loader/classloader/generics/ByRefLike/Validate.csproj]
src/tests/Loader/classloader/generics/ByRefLike/GenericTypeSubstitution.cs(8,7): error CS0246: The type or namespace name 'InvalidCSharp' could not be found (are you missing a using directive or an assembly reference?) [src/tests/Loader/classloader/generics/ByRefLike/Validate.csproj]

The InvalidCSharp assembly reference is unresolved during the minifullaot test build, causing CS0246 compile errors in the ByRefLike/Validate test project.

Error Message

true only for clear infra flakes. ExcludeConsoleLog skips helix log scanning. -->

{
  "ErrorMessage": "error CS0246: The type or namespace name 'InvalidCSharp' could not be found (are you missing a using directive or an assembly reference?) [/__w/1/s/src/tests/Loader/classloader/generics/ByRefLike/Validate.csproj]",
  "ErrorPattern": "",
  "BuildRetry": false,
  "ExcludeConsoleLog": false
}

Impact on platforms

  • runtime-extra-platforms (def 154) / linux-x64 Release AllSubsets_Mono_MiniFullAot_RuntimeTests minifullaot / Build Tests
  • Occurrences in window: 3+ (builds 1436493, 1438268, 1440191)

First build it occurred


Filed by ci-failure-scan, which scans dnceng-public outer-loop pipelines on main and converts stable failures into KBEs and test-disable PRs.

Generated by CI Outer-Loop Failure Scanner · ● 16.3M · ◷

Report

Summary

24-Hour Hit Count 7-Day Hit Count 1-Month Count
0 0 0

Activity

  1. jeffschwMSFT commented on May 29, 2026

    @jeffschwMSFT
    Member

    @vitek-karas / @steveisok what is this leg validating? monoVM on Linux X64 with full AOT?

  2. steveisok commented on May 29, 2026

    @steveisok
    Member

    @vitek-karas / @steveisok what is this leg validating? monoVM on Linux X64 with full AOT?

    Yes, it's one of the canaries for other configurations legs. I'm not sure we really need it.

  3. github-actions commented on Jun 18, 2026

    @github-actions
    ContributorAuthor

    Workflow artifact: ci-fix
    Artifact kind: handoff
    Linked KBE: #128767

    Note

    AI/Copilot-generated triage note.

    This Known Build Error has no producible automated code change (reason: the existing MonoAotIncompatible=true test exclusion mechanism should prevent this project from building under minifullaot, but fails for an undetermined MSBuild property-evaluation or SDK-specific reason that cannot be diagnosed or fixed without full build log access), so I could not open even a best-effort PR. Looping in owners so it can be fixed forward rather than muted.

    Root cause (best analysis)

    Validate.csproj (and its dependency InvalidCSharp.ilproj) both carry <MonoAotIncompatible>true</MonoAotIncompatible>. The standard exclusion mechanism in src/tests/Directory.Build.targets (line 15) should set DisableProjectBuild=true when RuntimeFlavor=mono and RuntimeVariant=minifullaot, which triggers nobuild.targets to suppress compilation.

    However, in the linux-x64 Release AllSubsets_Mono_MiniFullAot_RuntimeTests leg, these projects are still compiled, causing:

    Validate.cs(5,7): error CS0246: The type or namespace name 'InvalidCSharp' could not be found
    

    Investigation path:

    • The pipeline passes -mono /p:RuntimeVariant=minifullaot to src/tests/build.sh
    • build.sh exports __RuntimeFlavor=mono and passes /p:RuntimeVariant=minifullaot to MSBuild
    • build.proj (lines 233-234) explicitly passes both /p:RuntimeFlavor=$(RuntimeFlavor) and /p:RuntimeVariant=$(RuntimeVariant) to inner builds
    • The DisableProjectBuild condition in Directory.Build.targets checks both properties
    • Despite all properties appearing correct, the exclusion does not fire

    Possible causes:

    1. MSBuild property evaluation order — DisableProjectBuild may be evaluated before /p:RuntimeFlavor / /p:RuntimeVariant are resolved in the IL SDK import chain
    2. Microsoft.NET.Sdk.IL may handle Directory.Build.targets import differently
    3. The ManagedBuild target in build.proj (line 196, condition !$(MonoAot) and !$(MonoFullAot)) runs because only -mono is passed (not -mono_fullaot), but MonoFullAot is not set to true for minifullaot — meaning the managed build runs and compiles projects that should be excluded

    Evidence

    • Failing build: https://dev.azure.com/dnceng-public/public/_build/results?buildId=1438268
    • First build it occurred: build 1433744, 2026-05-25 (computed within the scanned window; may not be the true origin)
    • Persistent across all scanned builds
    • No regressing change identified — this appears to be a pre-existing gap in the build exclusion mechanism for minifullaot

    Suggested reviewers / area contacts

    • Area owners (area-VM-meta-mono): @steveisok, @dotnet/runtime-infrastructure
    • Related: @vitek-karas (Mono AOT infrastructure)

    The simplest resolution may be to verify whether this minifullaot test leg is still needed (as noted in the earlier comment thread), or to investigate why DisableProjectBuild does not fire for these projects.

    Note

    🔒 Integrity filter blocked 1 item

    The following item was blocked because it doesn't meet the GitHub integrity level.

    To allow these resources, lower min-integrity in your GitHub frontmatter:

    tools:
      github:
        min-integrity: approved  # merged | approved | unapproved | none

    Generated by CI Outer-Loop Failure Fixer · ● 51.4M · ◷

  4. removed
    untriagedNew issue has not been triaged by the area owner
    on Jul 11, 2026
  5. added this to the Future milestone on Jul 11, 2026
  6. removed
    blocking-clean-ciBlocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms'
    on Jul 15, 2026
  7. jeffschwMSFT commented on Jul 15, 2026

    @jeffschwMSFT
    Member

    removing blocking-clean-ci as it has not failed in 30 days

    24-Hour Hit Count 7-Day Hit Count 1-Month Count
    0 0 0
  8. kotlarmilos commented on Jul 28, 2026

    @kotlarmilos
    Member

    Fixed in #131081

  9. locked and limited conversation to collaborators on Aug 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions