Share via


Assembly.Load* now apply policy

Gotdotnet.com has a link to the breaking change from .Net framework 1.1 to .Net framework 2.0. It does not include everything. This one is missing from the link.

In .Net framework 1.1, there are

Assembly.Load(String),
Assembly.Load(AssemblyName)
,
Assembly.LoadFrom(),
Assembly.Load(Byte[])

Assembly.LoadFile(String)

Of those APIs Assembly.Load(String) and Assembly.Load(AssemblyName) are name based. And the rest are bits based.

Named based assembly loading will evaluate binding redirect policy. The others will not.

In Whidbey beta1 we introduce a breaking change. Now every API above will apply policy. For those bits based assembly loading, we will find the bits, extract its assembly identity, and evaluate binding redirect policy on the assembly identity. If the policy results in a different assembly identity, we will discard the original copy, and use its assembly identity to re-start the probing.

This is done to enable global servicing. When you drop a publisher policy, every assembly will see the publisher policy, regardless how you load them.

Comments

  • Anonymous
    September 18, 2005
    .Net Framework 2.0 introduces several new assembly loading APIs.
     
    Assembly.ReflectionOnlyLoadFrom(String...