Does anyone know how to have two versions of the same .dll file referenced in the same .net application Let me explain. I have an application that dynamically loads forms contained in other assymblies. The assymblies are in seperate folders with all of the .dlls necessary to run that form in the same folder. The problem I am having is that each of these forms use the same .dll file with different versions. I keep running into the following error when my application tries to open one of these forms:
The located assembly's manifest definition does not match the assembly reference.
I know that this means that one of my dynamically loaded forms is finding the wrong version of the assymbly needed for that form. I'm assuming this is because it's loading the assymbly for the other form. I am not sure why this is happening. I thought that if I kept the .dlls for the forms seperate in their own folders that it would use those first when loading the assymbly for that form.
I have read other posts that would suggest that as long as my assymblies are not strongly typed (which they are not) that the assymbly resolution will look locally for the needed assymbly. My only guess is that since the .dlls that are needed for the form are in a folder seperate from the initially run application that it is by default looking in the GAC because it can't find it locally.
This is my suspicion since if I copy the .dll that is giving me the problem to the folder running my main loader application then my form runs fine. If that is the case then I don't know how to make sure that each of my forms uses the correct version of their respective assymblies since I can't very well copy two versions of the same file into the same folder. I have searched and searched and tried everything I can think of with no luck. Any ideas
If examples are needed I can see if I can post screen captures somehow.
Thanks,
Joe