finding an assembly's domain

  • Thread starter Thread starter Bob
  • Start date Start date
B

Bob

I can't find a way to do this - is it possible to get the app domain that a
given assembly is executing within?

TIA,
Bob
 
I can't find a way to do this - is it possible to get the app domain that a
given assembly is executing within?

An assembly can be loaded into multiple appdomains.

What are you trying to accomplish?



Mattias
 
If I'm looking at a control type that I know is executing at design time,
I'd like to be able to look at that app domain and see what other assemblies
are loaded into it. But I guess access to that app domain isn't something
implicitly available from the type, is it?
 
Bob,
If I'm looking at a control type that I know is executing at design time,
I'd like to be able to look at that app domain and see what other assemblies
are loaded into it.

I'm not sure exactly what you mean by "looking at", but if your code
is executing in the same appdomain as the control, you can get all
assemblies loaded into it with
AppDomain.CurrentDomain.GetAssemblies().

But I guess access to that app domain isn't something
implicitly available from the type, is it?

Where do you get the Type object to begin with?



Mattias
 
Um, more specifically, at design time I'm looking at a control instance and
want to gather information about other assemblies that may also contain
controls and are available to the IDE at design time.

Hmm. But you're saying that the current AppDomain is already the one I'm
looking for, so everything I need will be in GetAssemblies? OK, I guess I
was just missing something and mistakenly thought that my reflection utility
was executing in another domain...

thanks,
Bob
 
Hmm. But you're saying that the current AppDomain is already the one I'm
looking for, so everything I need will be in GetAssemblies?

If I understand your scenario correct, yes. But I may be missing
something...



Mattias
 
Back
Top