.Net Type Forwarding Example
TypeForwardingTest application references
MyLibrary.dll. In the next version, the library is split into two parts:
RedLibrary.dll: those are in the "v2" folder.
However, we can still keep existing callers compatible by creating a shim version of
Library.dll that forwards
RedClass to the new assemblies.
make_v2.bat to copy v2 binaries to the
bin folder, and observe that the original
TypeForwardingTest.exe runs just fine, invoking new versions of the classes from new assemblies.
RedLibrary.dll are signed with a different public key, and it does not cause any issues.
MyLibrary.dll, however, has to be signed with the same key in all versions, or binary compatibility will be broken.