Compare compiled .NET assemblies?

前端 未结 6 1787
我在风中等你
我在风中等你 2020-12-01 00:29

Are there any good programs out there to compare to compile .NET assemblies?

For example I have HelloWorld.dll (1.0.0.0) and HelloWorld.dll (2.0.0.0), and I want t

6条回答
  •  孤街浪徒
    2020-12-01 01:25

    The tool NDepend offers many features to handle .NET code diff. Disclaimer: I am one of the developer of the tool.

    The panel Search by Change is dedicated to browse assemblies code diff. Notice that:

    • You can plug to NDepend any code diff tool used by the menu Compare older and newer version of source file
    • If you don't have the source code, only the raw assemblies, there is the option Compare older and newer version disassembled with Reflector

    NDepend Search by Diff Panel

    Notice also in the screenshot that a CQLinq code query is generated to browse the diff.

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

    Many others default diff queries and rules are proposed by default, that will let you browse .NET code diff in a smart way.

    • Types that used to be 100% covered but not anymore
    • API Breaking Changes: Methods
    • Avoid making complex methods even more complex
    • Avoid decreasing code coverage by tests of types
    • From now, all types added or refactored should respect basic quality principles
    • Avoid transforming an immutable type into a mutable one
    • Heuristic to find types moved from one namespace or assembly to another

提交回复
热议问题