login | about | faq

If you have any feedback from our EAP, we've created a UserVoice forum especially for you! Check it out, and let us know what you think of the latest Early Access build.

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

asked Feb 01 at 16:13

flober's gravatar image

flober
213


Thanks for the comments. I've added this to our bug tracking system as issue RP-2447.

answered Feb 02 at 08:27

Clive's gravatar image

Clive ♦♦
1.1k5

edited Feb 02 at 08:27

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.

answered Feb 16 at 16:36

flober's gravatar image

flober
213

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.

answered Feb 21 at 07:35

flober's gravatar image

flober
213

Your answer
toggle preview

Follow this question


By Email:

Once you sign in you will be able to subscribe for any updates here


By RSS:

Answers

Answers and Comments

Formatting your answer

  • *Italic*
  • **Bold**
  • ***Bold Italic***
  • Link: [text](http://url.com/ "title")
  • Paragraph: Two line breaks
  • Bulleted list: Paragraph then start line with *
  • Numbered list: Paragraph then start line with 1.
  • Blockquote: Paragraph then start with with >
  • Basic HTML tags are also supported

Asked: Feb 01 at 16:13

Seen: 230 times

Last updated: Feb 21 at 07:35

 

Tags:

×3
×2
×1
×1
×1