Binary Compatibilities with the Full .NET Framework

The .NET Compact Framework is a compatible subset implementation of the full .NET Framework and the common language runtime.

In the absence of a strong-name binding policy, an application that is compiled against the .NET Compact Framework will bind and run on the full .NET Framework. Note the following considerations:

  • The .NET Compact Framework assemblies are signed with different strong-name key pairs so that the common language runtime can distinguish them from their full .NET Framework counterparts.

  • The .NET Framework provides a binding policy to substitute full .NET Framework assemblies in place of compatible .NET Compact Framework references. It will then be possible, in common cases, to reuse existing components without creating new instances of objects. For example, if your component references only the .NET Compact Framework System classes, it will be compatible with both Frameworks.

  • The full .NET Framework does not support classes and types that are supported only by the .NET Compact Framework, as listed in Supported Classes in the .NET Compact Framework.

Just as cross-platform binary compatibility simplifies middleware component development and deployment, rich-client applications should take advantage of device-specific functionality to improve the user experience. This implies that the best graphical user interface code will probably be target-specific.

Even though the .NET Compact Framework factors device-specific functionality into discrete namespaces and assemblies to avoid binding conflicts, there will likely be cases of incompatible factoring that cannot be handled. In these cases, inadvertent use of the device-specific functionality with the full .NET Framework will cause a runtime exception instead of an application-loading exception.

See Also

Other Resources

.NET Compact Framework Assemblies and Files