This is somewhat of a follow up to: Reference alternate to reference assembly in Visual Studio 2010?
I am referencing an alternative version of a core framework DLL. Visual Studio (and the local debugger fabric) has no problem referencing this file. Additionally, the file is marked Copy Local
. However, when I deploy to the cloud, I get:
Could not load file or assembly '(assembly strong name)' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference.
Using remote desktop, I determined that the correct file is indeed in the E:\approot
folder along with my other dependencies. I am assuming that the fabric is looking in the GAC instead of using my files.
Is there a way to force it to use my DLL first?
Note: The entire concept of replacing a .NET CLR DLL is a huge hack anyway, so hacks are welcome. When .NET 4.5 comes out supporting the feature I need, this will all be stripped out.
Further info: It appears my web role works fine, but my worker role dies with that error when it attempts to build my Autofac container. This happens even if I explicitly load the assembly before building it, which also works fine.