I'd like to be able to do a code-level diff between two assemblies; the Diff plug-in for Reflector is the closest thing I've found so far, but to compare the entire assembly is a manual process requiring me to drill-down into every namespace/class/method.
The other tools I've found so far appear to be limited to API-level (namespaces, classes, methods) differences--which won't cut it for what I'm looking for.
Does anyone know of such a tool? My requirements (from highest to lowest) are:
(Personally I like WinMerge for text diffs, so an application with a similar interface would be great)
JustAssembly is a lightweight . NET assembly diff and analysis tool built on top of the Telerik JustDecompile Engine. As opposed to just comparing signatures, it produces a diff on all assembly contents including the code of the methods.
In the Microsoft . NET framework, an assembly is a partially compiled code library for use in deployment, versioning and security. There are two types: process assemblies (EXE) and library assemblies (DLL). A process assembly represents a process which will use classes defined in library assemblies. .
It is basically a compiled code that can be executed by the CLR. An assembly is a collection of types and resources that are built to work together and form a logical unit of functionality. An Assembly can be a DLL or exe depending upon the project that we choose.
By default, assemblies are private. A private assembly is used only by a single application, and is stored in application folder, or in a subfolder. When the . net code gets compiled it generates an assembly which is stored in bin folder.
The tool NDepend offers many features to handle .NET code diff.
The panel Search by Change is dedicated to browse assemblies code diff:
Many code rules that constraint diff and evolution are proposed. They can be a good start to write your own ones or adapt them to your needs. For example look at the rule:
Types that used to be 100% covered but not anymore
// <Name>Types that used to be 100% covered but not anymore</Name>
warnif count > 0
from t in JustMyCode.Types where
t.IsPresentInBothBuilds() &&
t.OlderVersion().PercentageCoverage == 100 &&
t.PercentageCoverage < 100
let culpritMethods = t.Methods.Where(m => m.PercentageCoverage < 100)
select new {t, t.PercentageCoverage, culpritMethods }
or also:
To get started with NDepend compare capabilities, have a look at the documentation:
Advanced Code Diff from within Visual Studio: explains how to use the NDepend build comparison features, in the context of Visual Studio and Visual NDepend standalone UI.
Reporting Code Diff: explains how to use the NDepend build comparison features, in the context of reporting.
Disclaimer: I work for NDepend
ILSpy can decompile an assmembly out to a tidy directory structure. Do this for each of your assemblies and you can use a diff tool of your choice to see what has changed.
You can use ILDasm
to generate il source from an assembly. IL source is basically a text file, so you can compare two il files using standard text diff tools. Interpreting the IL sources may not necessary, if you use the reported diffs as an indication where to look further.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With