Framework Unification Policy Change in .Net framework 2.0

Alan discussed Unification Policy in detail in his blog.

Unification Policy

Unification Policy is first introduced in v1.1. The unification policy’s behavior is to move every assembly reference in the unification policy up (or down, depending on the reference) to the one shipped in .Net framework 1.1.

This has some side effect. If you try to load v2.0 framework assemblies, and you are running under .Net framework 1.1, fusion will silently give you the v1.1 version of framework assemblies.

By doing that, we basically claim v1.1 version of framework assemblies are forward compatible with v2.0 version of framework assemblies. Of course, we can never claim that. If you really depend on some v2.0 feature, this decision basically screws you.

Recognizing this problem, in v2.0, we made some change to unification policy. Specifically, unification policy will be applied to assembly references with lower version number than the ones of framework assemblies, as well as assembly references within the same major/minor version number of the ones of framework assemblies. This change means, we will only guarantee compatibility for old assemblies, as well as future assemblies with the same major/minor version.

This is best illustrated by an example:

F:\Temp>more load.cs
using System;
using System.Reflection;

public class Test
    public static void Main(String[] args)
        if (args.Length == 0) {
            Console.WriteLine(“Usage: Load AssemblyDisplayName”);

        String asmName = null;

        foreach(String s in args) {
            asmName += s;

        try {
            Assembly asm = Assembly.Load(asmName);
        catch(Exception e) {
            Console.WriteLine(“Exception: {0}”, e.Message);

F:\Temp>load system, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
System, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089

F:\Temp>load system, Version=2.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
System, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089

F:\Temp>load system, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089
Exception: Could not load file or assembly ‘system, Version=, Culture=neu
tral, PublicKeyToken=b77a5c561934e089′ or one of its dependencies. The system ca
nnot find the file specified.

You can see that unification policy is applied to version 1.0.5000.0, and 2.0.5000.0, but not for

You will see this change in .Net framework v2.0 beta2.

Comments (4)

  1. Phil W says:

    Perhaps this is a test! – you don’t explicitly say that you compiled/ran more.cs with the 2.0 framework, but if I understand this scheme, you are running under the 2.0 framework when you do those Assembly.Load()s in your example.

  2. Phil,

    Of course, the test application is running under framework 2.0.

Skip to main content