views:

938

answers:

4

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:

  • Be able to analyze / reflect the code content of two versions of the same assembly and report the differences
  • Accept a folder or group of assemblies as input; quickly compare them (similar to WinMerge's folder diff's)
  • Quick ability to determine if two assemblies are equivalent at the code level (not just the API's)
  • Allow easy drill-down to view the differences
  • Exporting of reports regarding the differences

(Personally I like WinMerge for text diffs, so an application with a similar interface would be great)

+2  A: 

Hi there.

Try these:

http://www.microsoft.com/downloads/details.aspx?familyid=4b5b7f29-1939-4e5b-a780-70e887964165&displaylang=en

http://www.ndepend.com/

http://code.msdn.microsoft.com/fds

Cheers. Jas.

Jason Evans
Thanks for the suggestions; NDepend is on our 'to-buy' list for next year, but their Compare tools aren't available in the trials. Do you know if it does code-level diffs? Framework Design Studio is API-level, and I've got libcheck but haven't actually tested it--so I'll give it a shot right now :)
STW
I did mess about with NDepend a while back, but never got into it too deep. I was impressed with it, but I don't know about the code-level diff I'm afraid.
Jason Evans
+1  A: 

I believe there is a Reflector addon for that at http://www.codeplex.com/reflectoraddins called diff. You can try that.

Chris Brandsma
I've got it, and it does exactly what I want--but is only good for comparing a single method at a time. I mentioned this pitfall in line 1 of my question :)
STW
+5  A: 

For more details about NDepend compare capabilities have a look at these articles:

Avoid API breaking changes Explain how to use some Build Comparison features in order to write rules that detect API breaking changes.

How to avoid regression bugs while adding new features Explain how to use the Build Comparison feature in order to focus code review on code that have been changed and added since the last release.

Ensure the quality of the code that will be developed this year Explain how to use the Build Comparison feature in order to focus quality review on code that have been changed and added since a certain milestone.

Are you sure added and refactored code is covered by tests? Explain how to use both Build Comparison and Coverage features to detect when new or refactored code is poorly covered by tests.

Reporting Code Diff

Patrick Smacchia - NDepend dev
A: 

The diff addin for reflector is great! Ive been using it for years.

Kevin Castle
I like it as well for individual comparisons, but it doesn't scale when you need a diff report for a full assembly with several hundred methods, or for several hundred assemblies with a total of thousands of methods :-D
STW