System.AppDomain.AppendPrivatePath(string) is obsolete

  • Thread starter Peter Morris [Capable Objects]
  • Start date
P

Peter Morris [Capable Objects]

System.AppDomain.AppendPrivatePath(string) is obsolete :
AppDomain.AppendPrivatePath has been deprecated. Please investigate the use
of AppDomainSetup.PrivateBinPath instead.


From what I can see, using this recommended new approach restricts me to
adding the bin paths *before* I do anything else. My app only loads plugins
when told to by the user, by this time lots of other assemblies have loaded
etc. Googling on this subject has only revealed to me that plenty of people
are unhappy about this deprecation.

At the moment I am leaving this line of code in, but seeing as I hate
compiler warnings could someone tell me what the correct way of implementing
my requirement is?



Thanks very much.


Pete
 
N

Nicholas Paldino [.NET/C# MVP]

Well, are you loading all of the plug-ins in a single app domain? I
think the correct way to do this would be to load a separate app domain for
each plugin (or group of plugins) that you want to load.

My guess is that the reason why AppendPrivatePath was obsoleted is that
it was viewed as a security risk, as once the code was loaded into another
app domain, it could append a private path and possibly modify how a known
assembly was loaded.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

"Peter Morris [Capable Objects]" <firstname + '.' +
(e-mail address removed)> wrote in message
news:[email protected]...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top