Adam
2009-09-13 07:52:01 UTC
A development team I work with distributes a .NET assembly (implemented in
MC++) that in turn depends on native DLLs.
This assembly is consumed by a few teams that develop servers that perform
some business that depends on this assembly.
These applicative teams now wish to run their applications in a single
process by creating several appdomains.
The catch is that the various applications depend on different versions of
this same assembly, and thus on different versions of the native DLLs.
From initial tests we performed we know that the first appdomain to call our
assembly will get its version of the native DLLs loaded. When the second
appdomain loads our assembly (but a different version), it will load the
second version of the managed assembly, but will use the native DLLs already
loaded for the first appdomain (which may not be compatible with the assembly
loaded by the second appdomain).
Is there any way around this? For example, can I create a multi file
assembly referencing the native DLLs, so that each appdoain gets its own
version?
If yes – how? If not, any other ideas?
Thanks
Adam
MC++) that in turn depends on native DLLs.
This assembly is consumed by a few teams that develop servers that perform
some business that depends on this assembly.
These applicative teams now wish to run their applications in a single
process by creating several appdomains.
The catch is that the various applications depend on different versions of
this same assembly, and thus on different versions of the native DLLs.
From initial tests we performed we know that the first appdomain to call our
assembly will get its version of the native DLLs loaded. When the second
appdomain loads our assembly (but a different version), it will load the
second version of the managed assembly, but will use the native DLLs already
loaded for the first appdomain (which may not be compatible with the assembly
loaded by the second appdomain).
Is there any way around this? For example, can I create a multi file
assembly referencing the native DLLs, so that each appdoain gets its own
version?
If yes – how? If not, any other ideas?
Thanks
Adam