Skip to content

Add tests for downgrading assembly resolution via resolution extensions #84039

@vitek-karas

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.

Metadata

Metadata

Assignees

Labels

area-AssemblyLoader-coreclronly use for closed issuesin-prThere is an active PR which will close this issue when it is mergedtest-enhancementImprovements of test source code

Type

No type
No fields configured for issues without a type.

Projects

Status

No status

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions