This may be an easy one (I hope so).
The ultimate goal I have is to be able to use binding redirects that are
specific to secondary appdomains, so that each appdomain can have a unique
configuration.
Here's are the details: I want to force all references to a particular
assembly version to use the latest version of the assembly. I can do this by
adding binding redirects to the app config file and in a test I did it all
works fine.
The actual application consists of a small launcher app that creates an
appdomain and loads up a particular version of the "real" app and executes
it - when the app is done the appdomain is unloaded. The user may then point
it at a different version of the same app and repeat the process, all
without exiting the launcher application.
Each time an appdomain is created and a version is loaded there may need to
be a different binding redirect policy for the same assembly. The problem is
that as far as I can tell the app config applies to the launcher app, and
does not get reloaded just because it creates a secondary appdomain and
executes another assembly within it. What is needed is for the binding
redirects to get reevaluated each time a new appdomain is created. It would
be desirable if it could be appdomain specific, so that I could load and run
multiple appdomains simultaneously with different binding redirects.
Does anyone know how to do this?
Thanks.
Dave