Open wsficke opened 11 months ago
The failing method is: https://github.com/dotnet/cecil/blob/1a6a83a8f50e1119f1007b1e3c211d3289ba6901/Mono.Cecil/AssemblyReader.cs#L1666-L1667
This can only fail like the above if the member in question can't be found. This would suggest potentially invalid IL, or IL with unresolvable tokens. Specifically this seems to fail because there's a method with a semantics record marking it as getter/setter for a property, but the property token which points to the property the method belongs to can't be resolved to a property on the same type.
Without providing us a repro, you might be able to attach a .NET debugger to the illink process and see what method is being processed when this happens. I would probably do something like:
/bl
to get msbuild binlog.MarkStep.ProcessMethod
, the first parameter method
should be the method in question (very likely the accessor which is problematic).Once you have the affected method, I would use something like ilspy to open the IL and see if there's something wrong with it. You might also be able to tell where the method came from.
If you're comfortable providing us a repro (privately), please file a VS feedback item. That will let you upload the repro in such a way that only MS employees will see it.
/cc @sbomer @agocke
Error below occurs when trimming a proprietary and relatively complex Avalonia UI project. If further information is required for triage analysis, please mention me in discussion to arrange a private conversation.