views:

51

answers:

0

Hello guys,

I've specified an assembly binding for a newer version of an assembly used in my app, and works great.

However, on one of my client machines, the new version of that assembly is missing, but instead the old one is present. When I try to run the app, it says it cannot find the new version, which is normal, I guess. The question is, how can I tell the .NET framework to use back the old version if the new version is not available?

The purpose is to have a unique config file that works automatically depending of the assembly version installed on any client machine. I want to have a unique configuration file, that works like this:

  • if referenced assembly has version 1, than use that version 1.
  • if referenced assembly has version 2, than use that version 2.
  • ... etc

I'm trying to avoid to modify the assemblyBinding information at runtime, depending of the installed version of that referenced assembly.

Any ideas? Thanks.