I develop client application that invokes product that has multiple versions and my customers can load different versions of the product one after another.
In order to support that in previous versions I created Application domain for each time user picked version.
Is it the right way to do it ? Do I have alternative ?
EDITED: Multiple versions - multiple dlls
Thank You!
If different versions of products reside in different DLLs, then yes, AppDomain is the right way to do it.
Although make sure you don't leak the DLLs to your main domain.
Also, run some tests to make sure you don't leak memory.
UPDATE
Alternative is to load the DLLs in another process and use RPC or service calls. I guess that's an overkill for your application.