Search code examples
c#.netbinary-compatibility

Tool for backwards compatibility for the C#/.NET API?


I found this tool, http://sab39.netreach.com/Software/Japitools/JDK-Results/46/, which checks for backwards compatibility between different versions of APIs for Java using javadoc.

Is there an tool equivalent to this one for C#/.NET?

Here is an example of a comparison between JDK 1.5 and JDK 6 APIs using this tool: http://www.kaffe.org/~stuart/japi/htmlout/h-jdk15-jdk6


Solution

    • ApiChange does take a set of "old" assemblies and a set of "new" assemblies which are diffed for potentially breaking Api changes:

      ApiChange -diff -old HelloWorldV1.dll -new HelloWorldV2.dll

    • LibCheck allows you to compare two versions of an assembly and determine the differences. The tool reports the differences as a combination of "removed" and "added" APIs:

      LibCheck -store HelloWorld.dll 1.0 -full C:\HelloWorldV1\
      LibCheck -store HelloWorld.dll 2.0 -full C:\HelloWorldV2\
      LibCheck -compare 1.0 2.0

    See also "Working with LibCheck", "Highlight Public API Differences Between Assembly Revisions" and "Api Diff Between Assemblies" articles.