I would like to load two different versions of the same dll within the same process. At the same time I would like to avoid placing any of them in the GAC.
Any ideas?
Thanks,
Krikor
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yes, it seems like i have to manually load the assembly, one way or another.
One solution that i found was to subscribe to the AssemblyResolve event of the appDomain. This event is raised when an assembly is not found and allows you to manually provide it.
AppDomain.CurrentDomain.AssemblyResolve += MyResolveEventHandler;
static Assembly MyResolveEventHandler(object sender, ResolveEventArgs args)
{
return Assembly.LoadFrom(@”OldAsm\Asm.dll”);
}
I would keep looking for a way to resolve the right reference without having to write any code and without having to put anything in the GAC. If anyone finds a way, please post it.
Thanks