Compare 2 versions of the .NET assembly?

How to compare 2 versions of a compiled .NET assembly to see changes between two versions? My library is not well documented, and I need to know what has been changed between the old version and the new version.

+7
diff
source share
5 answers

The NDepend tool offers many features for handling .NET code diff. Disclaimer: I am one of the developers of this tool.

The Change Search panel is used to view assembly code. Note:

  • You can connect to NDepend with any code comparison tool used in the menu. Compare the older and newer version of the source file.
  • If you do not have source code, only source assemblies, there is the option Comparison of the older and newer versions, disassembled with Reflector

NDepend Search by Diff Panel

Note also the screenshot that the CQLinq code query is generated to view diff.

from m in Application.Methods where m.CodeWasChanged() select new { m, m.NbLinesOfCode } 

By default, there are many other default queries and rules that allow you to browse diff diff code in a smart way.

+2
source share

In addition to Reflector, you can use NDepend to complete this task. Please note that this is commercial software, but the site offers a free trial. Here's an online tutorial on how you can use NDepend to compare two assemblies.

+4
source share

Use the Red Gate .NET reflector and you can see the actual code changes between assemblies.

+1
source share

I am using a reflector with a Diff plugin.

You can also find this Hanselman post useful as it reviews other tools, including Reflector Diff.

http://www.hanselman.com/blog/ManagingChangeWithNETAssemblyDiffTools.aspx

+1
source share

Do you have code or just assemblies? If you have compiled versions, one way is to dig them using the object browser in Visual Studio. Another approach would be to use a disassembler, such as Red Gates Reflector , to see the source code.

0
source share

All Articles