here is my script:
I have three projects: two DLLs and one console application, name them foo.dll, bar.dll and console.exe. Console.exe downloads the file foo.dll using Assembly.LoadFile (@ "c: \ foo.dll"). The Foo.dll project has a link to bar.dll and uses the class. Console.exe loads foo.dll in order, the problem occurs when foo.dll tries to use the bar.dll class. I get "unable to load assembly:" bar.dll "blah blah exception.
Some moments:
- All projects have strong names.
- Prefers not to use the GAC
- Bar.dll is located in the directory c: \ bar.dll
So, everything is in the same local directory referenced by the correct DLLs (via the project properties, and I used Reflector to make sure the build versions are correct). If I installed bar.dll in the GAC, everything will work as expected.
I think it has something to do with calling Assembly.LoadFile and makes the transition to the second DLL, but I'm not sure.
Thanks for your time and input.
source
share