Question

Does anyone know a decent tool that will compare two different versions of the same dll and extract the differences?

thanks

Was it helpful?

Solution

Reflector has a Diff tool. Note: Reflector is now paid software.

OTHER TIPS

dotPeek from JetBrains can also be used. It is also free.

  • Open the assembly up in dotPeek
  • Select the assembly
  • File --> Export to project
  • Choose a location on disk

Repeat the above for the assembly you want to compare, then open the two folders in a diff tool. I used WinMerge.

You'll notice that the vast majority of files have differences. This is because the files have a comment at the top like this

// MVID: {some guid here}

You can create a filter in WinMerge to ignore it

  • Tools --> Filter...
  • Goto the "Line Filters" tab
  • Add the following filter ^// MVID:

When you okay the changes, it will rescan the folders and ignore any line that starts with that comment. Now you should see just the changes you're interested in.

Why not disassemble first and then compare?

Use .NET Reflector (Free version is all you need) to open the dlls then right-click and choose to export them to separate directories.

Then use ExamDiff Pro to compare the directories (You can get a 30-Day free trial). You can navigate through the sub folders and open each file as necessary into a new Comparison window (Just double-click in the ExamDiff Pro Window). Works awesome!

ExamDiff Pro also has a Dump PE32 plugin that will do a comparison directly between .dll and .exe files. This is helpful to look at header changes and flags binary differences, but will not decompile it for you (so use the Reflector method above).

The Microsoft BCL team have a tool do to this, it's called LibCheck and can be found here

http://blogs.msdn.com/b/bclteam/archive/2005/03/21/400123.aspx

This is an old tool, and I had to recompile the source using a later version of the runtime, but it works well and provide html reports on changes.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top