S
Stephen Ahn
Using dotnet 1.1, sp1, C#.
I have assembly "A", which references assembly "B". Neither of these
assemblies are stongly named.
I have an application which uses a plug in architecture, to load assembly
"A" using Assembly.Load(byte[]).
The app (actually a web service) needs to be able to have loaded multiple
versions of assembly "A" at the same time. eg. assembly "A" version 1, and
assembly "A" version 2. The directory structure looks like this :
-- Application's bin directory
-- v1 subdirectory (contains "A" version 1, and "B" version X).
-- v2 subdirectory (contains "A" version 2, and "B" version Y).
i.e. "A" version 1 should use "B" version X, and
"A" version 2 should use "B" version Y.
Both versions are loaded into the same AppDomain (The application's current
AppDomain). Assembly.Load(byte[]) is being used to load the versions of
assembly "A". This works fine.
My problems start when the versions of assembly "A" use the
AppDomain.AssemblyResolve event to try to load the required versions of
assembly "B". Ideally, I want to use that idea that assemblies in the same
subdirectory should use each other at runtime. There does not seem to be
enough information from inside the AppDomain.AssemblyResolve event to work
out which subdirectory's "B" to load.
Any ideas ?
eg. Load different versions of "A" into different AppDomains, make assembly
B version numbers more closely coupled with assembly "A"s version numbers ?
TIA,
Stephen
I have assembly "A", which references assembly "B". Neither of these
assemblies are stongly named.
I have an application which uses a plug in architecture, to load assembly
"A" using Assembly.Load(byte[]).
The app (actually a web service) needs to be able to have loaded multiple
versions of assembly "A" at the same time. eg. assembly "A" version 1, and
assembly "A" version 2. The directory structure looks like this :
-- Application's bin directory
-- v1 subdirectory (contains "A" version 1, and "B" version X).
-- v2 subdirectory (contains "A" version 2, and "B" version Y).
i.e. "A" version 1 should use "B" version X, and
"A" version 2 should use "B" version Y.
Both versions are loaded into the same AppDomain (The application's current
AppDomain). Assembly.Load(byte[]) is being used to load the versions of
assembly "A". This works fine.
My problems start when the versions of assembly "A" use the
AppDomain.AssemblyResolve event to try to load the required versions of
assembly "B". Ideally, I want to use that idea that assemblies in the same
subdirectory should use each other at runtime. There does not seem to be
enough information from inside the AppDomain.AssemblyResolve event to work
out which subdirectory's "B" to load.
Any ideas ?
eg. Load different versions of "A" into different AppDomains, make assembly
B version numbers more closely coupled with assembly "A"s version numbers ?
TIA,
Stephen