Why is Assembly.LoadFrom loading a previously unloaded strongly named assembly from the GAC instead of loading from the specified path?

70 views Asked by At

I am trying to load

System.ValueTuple Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51

in my current app domain using Assembly.LoadFrom method by specifying the full path.

The assembly does exist at this path and it has the same version that I need, and yet, it instead ends up loading

System.ValueTuple Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51

from the GAC.

The second one has a different build number. I know assembly probing starts from the GAC but since these assemblies are strongly named (so they all have a unique identity), shouldn't it realize that these are both different assemblies and then after failing to find it in the GAC, load it up from the specified path?

Is there a way I can force it to load from the specified path, instead of the GAC?

0

There are 0 answers