The -diff command does take a set of "old" assemblies and a set of "new" assemblies which are diffed for potentially breaking Api changes. The checks include
  • Added/removed types
  • Added/removed fields, methods, events (and properties)
    • A field is treated as changed when either its name, type or accessability modifier was changed.
    • A method is treated as changed when its return type, name or method arguments did change.
    • An event is treated as changed when either its name, type or accessability modifier was changed.


-DifF -old <filesV1> -new <filesV2>

You can compare whole directories with added and removed assemblies to get an overview what has changed.


Check for breaking changes from .Net 2 to .Net 4 in mscorlib.dll

ApiChange -diff -old $net2dir\System.dll -new $net4dir\System.dll

Compare from C:\Windows\Microsoft.NET\Framework\v2.0.50727 against C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0
System.dll has 99 changes
Removed 1 public type/s
- public class System.Threading.SemaphoreFullException
Added 26 public type/s
+ public class System.ComponentModel.Design.TypeDescriptionProviderService
+ public class System.Runtime.Versioning.FrameworkName
+ public class System.Threading.BarrierPostPhaseException
+ public class System.Threading.Barrier
+ public class System.Collections.Concurrent.BlockingCollection<T>
+ public class System.Collections.Concurrent.ConcurrentBag<T>
+ public interface System.Collections.Generic.ISet<T>
+ public class System.Collections.Generic.SortedSet<T>
+ public interface System.Collections.Specialized.INotifyCollectionChanged
+ public class System.Collections.ObjectModel.ObservableCollection<T>
+ public class System.Collections.ObjectModel.ReadOnlyObservableCollection<T>
+ public enum System.Collections.Specialized.NotifyCollectionChangedAction
+ public class System.Collections.Specialized.NotifyCollectionChangedEventArgs
+ public class System.Collections.Specialized.NotifyCollectionChangedEventHandler
+ public enum System.Security.Permissions.TypeDescriptorPermissionFlags
+ public class System.Security.Permissions.TypeDescriptorPermission
+ public class System.Security.Permissions.TypeDescriptorPermissionAttribute
+ public class System.Security.Authentication.ExtendedProtection.ExtendedProtectionPolicyTypeConverter
+ public class System.Net.DnsEndPoint
+ public class System.Net.WebUtility
+ public enum System.Net.Security.EncryptionPolicy
+ public enum System.Net.Sockets.IPProtectionLevel
+ public class System.Net.Configuration.HttpListenerElement
+ public class System.Configuration.SchemeSettingElement
+ public class System.Configuration.SchemeSettingElementCollection
+ public class System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute
public class System.ComponentModel.AttributeCollection
+ protected virtual System.Attribute[] get_Attributes()
+ protected void .ctor()
public class System.ComponentModel.CultureInfoConverter
+ protected virtual string GetCultureName(CultureInfo culture)
public class System.ComponentModel.TypeDescriptionProvider
+ public virtual System.Type GetRuntimeType(Type reflectionType)

The diff does only print changes in public types and methods. Changed attributes on class, method or argument level are not checked.

Last edited Jun 2, 2010 at 9:30 PM by Alois, version 2


No comments yet.