In support of Darin's answer of course you need to be eliminating such multi-version problems. His solution of using a binding redirect is a good one - +1 there. I can offer a solution that'll allow you to keep both if absolutely necessary, but you'll have to write a bit of code.
The only real problem you have here is that the two deployed filenames would have to be the same in order to be picked up by default by the loader. You could cheat really horribly and simply deploy the 5.8 dll as Conflict.exe
so it could sit side by side Conflict.dll
(and newer) and you'd find that it works.
Also, following the links through from Darin's answer you come to this topic MSDN topic on probing. Based on the content of this, you could simply deploy the 5.8 dll into bin\Content\Content.dll and when the runtime searches for it, it will look in this subfolder automatically.
However - that isn't a good solution :)
EDIT - NEW SOLUTION
If both versions of Conflict.dll are already signed, have you actually tried deploying one of the versions with a slightly different name? I've just set up a winforms app with two assembly references to different versions of the same (signed) assembly. This causes a couple of problems with the build, because the last-referenced version will be deployed to the bin folder, and the other one will not (so you have to manually copy in both; renaming one of them accordingly). Then I try running the app, which displays a message box containing two constant strings; one from each version of the assembly. It works absolutely fine.
Download a demo of this here - don't build it (otherwise you have to do the file renaming); just open the forms app's bin\debug folder and run the exe.
ClassLibrary1.dll and ClassLibary1vanything.dll are v1.0.0.0 and v2.0.0.0 of an assembly with otherwise the same name and public key. Despite the fact that classlibrary1vanything.dll has the wrong filename, it still works (probably because it is signed).
In the app.config I did put in a codebase hint, and thought that was why it worked (originally I deployed it as a different filename), but then I commented it out and it still worked. The codebase is probably most useful instead when the assembly has to be deployed to a sub folder or completely different location.
ORIGINAL TEXT
I've tried to get the second of the options mentioned in this support article from MS to work, but it doesn't seem to want to.
There is no doubt some clever way to do it out of the box, but since I'm not clever enough to have found it (yet), I would instead embellish and use the third of the options displayed in the aforementioned support topic and hook into the AssemblyResolve
event of the app domain.
If you add your own configuration (probably just in appSettings really) for the full name of the assembly to be bound to a different filename, then in your AssemblyResolve event handler you can consult the name of the assembly that is to be loaded to see if it's in your configuration. If it is, grab hold of the location and use Assembly.LoadFrom to load it.
Thus, once you have something like this in place, you simply add an entry for the Conflict v5.8 assembly name in there along with the filename that the app should use.
I don't know what type of app it is that you're deploying but in win forms, console apps and services AppDomain.CurrentDomain.BaseDirectory
will be equal to the bin folder and you can join that with the filename you want to load. Websites are a little trickier.
Should work a treat.