E
Eric Renken
I have an application that I am adding support for plug-ins and I am looking
for some help on the best way to handle this. My question has to do with
AppDomains and the best way to use them.
I have a directory structure like this:
MyApp
\AddIns
\AddIn1
\AddIn2
Part of my problem is that AddIn1 uses some of the assemblies that are
installed with MyApp and I don't want to duplicate those assemblies in the
AddIn1 or 2 directory. I don't want to put them in the GAC, so please don't
suggest that.
To support that now I am currently using this method:
AppDomain.CurrentDomain.AppendPrivatePath( <AddInPath> );
The problem with that is that this method is considered obsolete and I
really want to do this right. I have read that I should put the add-in a
separate AppDomain, but I am wondering if each AddIn should be in its own
AppDomain and if so what is the memory overhead of the AppDomain. These are
mostly very small add-ins and I don't want to kill the computer this is
running on.
I am also wondering if this is possible with my directory structure. I
really don't know much about creating AppDomains or what would be needed. I
hoping that with the AppDomain pointing to a DLL in MyApp\AddIns\AddIn1 that
I can also add the directory MyApp to its search path so that it can use the
same assemblies as the main application.
Can a search path be added that is higher than the main application for a
dynamically loaded AppDomain and a dynamically loaded DLL? Any Help would
be greatly appreciated on this.
Thanks,
Eric Renken
for some help on the best way to handle this. My question has to do with
AppDomains and the best way to use them.
I have a directory structure like this:
MyApp
\AddIns
\AddIn1
\AddIn2
Part of my problem is that AddIn1 uses some of the assemblies that are
installed with MyApp and I don't want to duplicate those assemblies in the
AddIn1 or 2 directory. I don't want to put them in the GAC, so please don't
suggest that.
To support that now I am currently using this method:
AppDomain.CurrentDomain.AppendPrivatePath( <AddInPath> );
The problem with that is that this method is considered obsolete and I
really want to do this right. I have read that I should put the add-in a
separate AppDomain, but I am wondering if each AddIn should be in its own
AppDomain and if so what is the memory overhead of the AppDomain. These are
mostly very small add-ins and I don't want to kill the computer this is
running on.
I am also wondering if this is possible with my directory structure. I
really don't know much about creating AppDomains or what would be needed. I
hoping that with the AppDomain pointing to a DLL in MyApp\AddIns\AddIn1 that
I can also add the directory MyApp to its search path so that it can use the
same assemblies as the main application.
Can a search path be added that is higher than the main application for a
dynamically loaded AppDomain and a dynamically loaded DLL? Any Help would
be greatly appreciated on this.
Thanks,
Eric Renken