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.
Context: #9043
While attempting to mark API-35 stable, we hit this error running all of the in-tree Windows smoke tests on CI:
This appears to be caused by the fact that today we:
ILLink*
project(s) fromruntime
with their0.11.5
Microsoft.DotNet.Cecil
package.0.11.4
Mono.Cecil
package.0.11.4
Mono.Cecil
"wins" and ends up in the output directory and the sdk pack.So long as
ILLink*
doesn't use any Cecil0.11.5
API, this works, however it is risky because we don't know exactly what APIILLink*
uses.Removing our building of API-34 (by making API-35 stable), and no longer building API-35 as a preview, this order seems to get changed and the
0.11.5
Cecil "wins" and ends up in the output directory. This causes the assembly load error listed above.We could try to fix the ordering and make
0.11.4
"win", but this leaves us vulnerable to missing some API thatILLink*
needs. As such, it's better that we update the rest of XA to use the0.11.5
version ofMono.Cecil
.This update breaks the
FixAbstractMethodsStep_Explicit
unit test. Specifically, this logic now returnsnull
instead of being able to be resolved:It feels like this makes sense: a method name and return type doesn't seem like it would be enough to resolve, as parameters are not considered.
The fix is simply to use the existing
MethodDefinition
as theMethodReference
, there is no reason to create a new one. This change fixes the test.This change was pulled out of #9043 to ensure that it doesn't cause any breakage.
Note: Technically
ILLink*
referencesMicrosoft.DotNet.Cecil
version0.11.4-alpha.24313.1
, which implies that it is0.11.4
, however theMono.Cecil.dll
inside is versioned as0.11.5
.