|
Hello!! First of all, .NET Reflector is a great tool!!! We purchased .NET Reflector and would like to compare two Interop assembly dll versions for potential compatibility conflicts. In our scenario .NET Reflector creates corresponding csharp code for both dlls. Then we do a text compare (Using an advanced tool called Beyond Compare). The problem is, that several attribute lists seam to be changed, but they haven't, because attributes order is undefined. Thus we would like to make a feature request to let .NET Reflector sort disassembled attributes (For example, by type name; Microsoft says attributes order has no semantic anyway.). Nice greetings, florian |
|
Thanks for the comments. I've added this to our bug tracking system as issue RP-2447. |
|
To give an example... x1) Current reflector version creates the following code for a part of excel v11 interop dll: [DispId(0x2f6)] MenuBar ActiveMenuBar { [return: MarshalAs(UnmanagedType.Interface)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime), DispId(0x2f6), TypeLibFunc((short) 0x40)] get; } x2) Current reflector version creates the following code for a part of excel v14 interop dll: [DispId(0x2f6)] MenuBar ActiveMenuBar { [return: MarshalAs(UnmanagedType.Interface)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime), TypeLibFunc((short) 0x40), DispId(0x2f6)] get; } These two lines only differ with order position of "DispId(0x2f6)". If reflector would order attributes related to same context by attribute name, the difference would be gone - as the dot net compiler, who is not interested in order of attributes. Than an automatic compare would be possible for these problems. |
|
Please order attribute for each context (method, class, parameter...) by attributes names. To better describe the problem, here an abstract example in addition: x1) Generated code of dll v1 may be: [A] [C] [B] void Procedure1() { //does something } void Procedure2([A] [C] [B] string value) { //does something } int Value { [A] [C] [B] get { return internValue; } } x2) Generated code of dll v2 may be: [B] [C] [A] void Procedure1() { //does something } void Procedure2([B] [C] [A] string value) { //does something } int Value { [B] [C] [A] get { return internValue; } } If reflector would order attributes by attributes names, those two dlls could be identified as equal (dot net compiler does not care about attribute order any way.); In this case generated code should look like: [A] [B] [C] void Procedure1() { //does something } void Procedure2([A] [B] [C] string value) { //does something } int Value { [A] [B] [C] get { return internValue; } } +++ Now an automatic compare would be possible for these problems. |