Publisher Policy — Highest version, which highest?

You can use publisher policy to redirect assembly version.

When there are multiple publisher policy assemblies for the same assembly, the highest version of publisher policy assembly will be used.

Turns out there is a bug in .Net framework v1.0/v1.1, that the alphabetic higest version, instead of the numeric highest version of publisher policy assembly is used.

This bug will be fixed in the next service pack release for .Net framework v1.0/v1.1.

Until then, you have to work around the bug by either making sure only one publisher policy exists for the assembly, or the numeric highest version of publisher policy is also the alphabetic highest version.

This bug does not exist on .Net framework v2.0.

Comments (7)
  1. David Levine says:

    Hi Junfeng,

    What an odd bug to have found. Do you have any examples that demonstrate this so we’ll know what to watch for? It would be nice to have an example of one so we can write our test code to ensure that our production code does not have the same bug.


  2. urxlnc says:

    So, you tell me that a string compare is being done instead of a numerical compare???

  3. David,

    For example,

    for assembly MyAssembly,Version=,Culture=Neutral,PublicKeyToken=0123456789abcdef

    Say there are two publisher policy assemblies for it:

    Policy.1.0.MyAssembly, Version=, …

    Policy.1.0.MyAssembly, Version=, … > numerically, but > alphabetically.

    We should apply the version publisher policy. Instead, version is applied.

  4. urxInc,

    It is not appropriate to disclose the technical detail of the bug. But suffice to say that String compare is not the reason.

  5. David Levine says:

    Sometimes my hands are faster then my brain – ran into this behavior many years ago when we sorted/compared numeric data that was stored in strings. Been there, had already forgot about it.

    Is this a problem that only affects publisher policy? Will binding redirects/codebase hints specified in the app.config be unaffected by this?

  6. The things affected are anything with GAC enumeration.

    So technically it also affects GAC Uninstall with partial name. But since the result for GAC Uninstall with partial name is undefined, it does not have any net effect.

  7. The conventional method of creating publisher policy (PP) assemblies becomes cumbersome when dealing

Comments are closed.

Skip to main content