Skip to content

Add tests for downgrading assembly resolution via resolution extensions #84039

Closed

Description

@vitek-karas

Currently it's possible to override the default assembly resolution mechanism and resolve a reference for A, Version=3.0 with A, Version=1.0, but only via extension mechanisms (AppDomain event handler, AssemblyLoadContext event handler, or custom ALC).

Normal runtime resolution (from the ALC.Default/TPA) will not allow downgrades.

We don't seem to have any tests for this though. The closest I could find are the binder tracing tests which validate that in this case the event handlers are invoked, but it doesn't validate that if the handler returns a lower version the runtime will accept it.

New tests should probably go under src/libraries and cover AppDomain.AssemblyResolve, AssemblyLoadContext.Resolving, and AssemblyLoadContext.Load.

Activity

  1. added
    test-enhancement
    area-AssemblyLoader-coreclr
    on Mar 28, 2023
  2. ghost added
    untriaged
    on Mar 28, 2023
  3. added this to the 8.0.0 milestone on Mar 28, 2023
  4. removed
    untriaged
    on Mar 28, 2023
  5. modified the milestones: 8.0.0, 9.0.0 on Jul 26, 2023
  6. modified the milestones: 9.0.0, 10.0.0 on Aug 9, 2024
  7. added
    in-pr
    on Jul 24, 2025
  8. locked and limited conversation to collaborators on Sep 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area-AssemblyLoader-coreclrin-prtest-enhancement

Type

No type

Projects

  • Status
    No status

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions