On Jun 24, 6:33 pm, Dmitry <[EMAIL PROTECTED]> wrote:
> Class1 base is GenericInstatnceType with generic argument T with owner > Class, but it must be Class1? I had this problem too. See: http://groups.google.com/group/mono-cecil/browse_thread/thread/94db0cf2396fcbdf/bfdd55cb3a6b2a97 For my particular application I found a solution in considering only the ordinal (position in the sequence) of the generic parameter rather than the owner. Without having enough knowledge of the architecture in Cecil to be certain, I think the problem could stem from a caching problem in the method GetTypeSpecAt in the class ReflectionReader. The caching circumvents the GenericContext object, which may be the source of the wrong owner parameters. > How i can fix this behavior? Try to comment out the following statement in the method to disable the caching: // if (tspec != null) // return tspec; It seems to fix the problem, but I am not sure it is a healthy fix (it could introduce new errors). Maybe someone else with more knowledge of the design of the ReflectionReader class and the caching mechanism can provide a proper fix? Rune --~--~---------~--~----~------------~-------~--~----~ -- mono-cecil -~----------~----~----~----~------~----~------~--~---
