Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I compare the contents of two dlls?

I would like to compare several dlls of one install to several dlls of another install of the application I'm working with. I need to ensure they are exact same. How do I compare two dlls to ensure they have the exact same methods, properties, version, etc?

I've started to use RedGate .Net Reflector, but the task became tedious so I thought I'd give SO a shot, see if anyone else has been in my situation before and has a quick solution.

Thank you!

like image 322
Eric Avatar asked Jul 23 '10 03:07

Eric


People also ask

How can we compare two dlls?

You can make use of the System. Reflection library to get the information about any assembly. The property you're looking for is Version property of the AssemblyName class. For more details check out this MSDN article.

How do I compare DLL files in beyond compare?

To compare files in the Folder Compare like in the file viewers: In the Folder Compare, select Session | Session Settings and pick the Comparison tab. Enable the Compare contents option and make sure Rules-based comparison is enabled.

How can I see the details of a DLL?

To view DLL propertiesSelect the desired DLL and right-click the file. Click Properties and Version.


2 Answers

I'm assuming that you can't rely on the assembly versioning to answer this.

A quick search on google turned up this post by Scott Hanselman that points to several tools that may solve your problem.

like image 160
Ken Henderson Avatar answered Sep 22 '22 14:09

Ken Henderson


I use WinMerge all the time to do this task. You can even compare entire directories. This is of course if you just need to know if they're the same, since it won't show you any code.

like image 20
Arturo Molina Avatar answered Sep 20 '22 14:09

Arturo Molina