[release/8.0-staging] ILC: Allow OOB reference to upgrade framework assembly #110059
+28
−4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Backport of #109988 to release/8.0-staging
/cc @sbomer
Customer Impact
Fixes a customer reported issue where the ILC build logic was making it impossible to upgrade FX assemblies via OOB references.
Regression
The inability to upgrade framework assemblies via OOB reference in ILC is not a regression, but changes in the particular OOB package the customer tried made this look like a regression when they upgraded to the latest version of this package.
Testing
Tested locally in a few different configurations:
IlcBuildTasksPath
to point to a local build of the task. Validated ILC picks the 9.0.0 version of the referenced assembly.No automated tests were added because we don't have a good place for this kind of integration test (see discussion in #109988).
Risk
Low. The impact is limited to native AOT scenarios, and is targeted specifically at the scenario where a PackageReference introduces a conflict with a framework assembly. The new error only shows up in scenarios that were already broken, but turns an unpredictable failure mode (failure during ILC with an unhelpful error message about some implementation details) into a predictable one.