Thank you Rick.
modify. I am writing a post-compiler, so imagine that plug-ins can
I will go for the AssemblyResolve solution, i.e. I will implement a custom
"Rick Strahl [MVP]" <rickstrahl@hotmail.com> wrote in message
news:O6x07O9mFHA.1088@TK2MSFTNGP14.phx.gbl...
>
> If you're adding plug-ins the best solution tends to be createing a new
> AppDomain and then loading the plug-ins into that. By doing so you can get
> to control the creation of hte new AppDomain and the PrivateBinPath with
it.
> All you have to do then is to make sure that all related assemblies exist
in
> the known paths that you've set up previously, which is a reasonable
> requirement for add-ins.
>
> There's no way to manipulate these settings once the AppDomain's been
> created. What I have done in the past where I didn't have the choice for a
> new AppDomain is go the brute force route and do my own 'shadow copying'
of
> assemblies from one place to another. This is ugly as sin but it worked to
> make things work as long as I knew where the files where coming from.
>
> +++ Rick ---
>
> --
>
> Rick Strahl
> West Wind Technologies
>
www.west-wind.com >
www.west-wind.com/weblog >
>
>
> "Gael Fraiteur" <gael@nosppam.fraiteur.net> wrote in message
> news:%23HwgDFnlFHA.576@TK2MSFTNGP15.phx.gbl...
> > Hi,
> >
> > Thanks to all for your answers.
> > My initial problem is that I need to load plugins that eventually have
> > private assemblies. So I want to extend the private path of the current
> > AppDomain dynamically (so using app.config was not a solution). I did
not
> > want to use AssemblyResolve because it though it was useless to
implement
> > some logic that is already present in the framework.
> >
> > Thanks again.
> >
> > --
> > Gael Fraiteur
> >
http://gael.fraiteur.net > > Prague, Czech Republic
> > ----------------------------------------------------------------
> > PostSharp is an open-source post-compiler for .NET
> >
http://gael.fraiteur.net/postsharp.aspx > > ----------------------------------------------------------------
> >
> > "Gael Fraiteur" <gael@nosppam.fraiteur.net> wrote in message
> > news:eHoo2bDlFHA.320@TK2MSFTNGP09.phx.gbl...
> >> I would like to add to the search path of my application a directory
> >> where
> >> some plug-ins reside. But this directory is not under the application
> >> base
> >> directory. I tried many procedures, but nothing works. By the way,
these
> >> things are quite badly documented in Beta 2.
> >>
> >> The problem is that the runtime claims it won't take into a account a
> >> private path that is not under the application base path. I overcame
the
> >> probleme by overloading AppDomain.AssemblyResolve, but this solution is
> >> quite dirty.
> >>
> >> Was someone successful with another solution?
> >>
> >>
> >>
> >> --
> >> Gael Fraiteur
> >>
http://gael.fraiteur.net > >> Prague, Czech Republic
> >> ----------------------------------------------------------------
> >> PostSharp is an open-source post-compiler for .NET
> >>
http://gael.fraiteur.net/postsharp.aspx > >> ----------------------------------------------------------------
> >>
> >>
> >
> >
>
>