Closed bucurb closed 8 months ago
Could you please try the latest version and see if this is still a problem? https://www.nuget.org/packages/ILRepack/2.0.23
If I'm reading this right, this should have been fixed with: https://github.com/gluck/il-repack/commit/22e076be53abe8299571607c6dedc16ff9d9c8a3
The bug was most likely: https://github.com/gluck/il-repack/issues/219
Hello,
I'm trying to merge some AspNetCore dlls. At some point, the merge tries to fix-up the references in type
Microsoft.AspNetCore.Server.Kestrel.Core.Internal.ConnectionLimitMiddleware
. This type has aOnConnectionAsync
method, which will at some point doconnection.Features.Set...
, and thus have theReferenceFixator
attempt to fix theMethodReference
forMicrosoft.AspNetCore.Http.Features.IFeatureCollection Microsoft.AspNetCore.Connections.ConnectionContext::get_Features()
.The reference fixator will correctly go through the
if (declaringType.IsDefinition && !method.IsDefinition)
but fail to find a definition fromMethodDefinition def = new ReflectionHelper(_repackContext).FindMethodDefinitionInType((TypeDefinition)declaringType, method);
. This is because the method is not defined on theConnectionContext
class, but on its base,BaseConnectionContext
. Both these classes areabstract
so I don't understand why the code does not scan the inheritance hierarchy upwards when searching for a method definition, is this a bug?