[Mono-list] Using other Assemblies at Run time

Met @ Uber met@uberstats.com
Sat, 01 Nov 2003 16:24:31 -0500


How do I tell the CLR where to look for assemblies?  Also, do you know
what to use in order to read the *.exe.config file?

thanks a lot,

~ Matthew

On Sat, 2003-11-01 at 15:47, Jaroslaw Kowalski wrote:
> Normally you put all your assemblies (exe and dlls) in the same directory or
> a subdirectory of the directory where the exe is located. These + GAC are
> the only places where assembly loader looks for assemblies.
> 
> Most .NET apps that I've used (NAnt, NUnit, SharpReader, FXCop) place all
> *.exes and *.directories in a application root directory or a bin directory.
> 
> You have either:
> 
> ROOT/bin/Application.exe
> ROOT/bin/Library1.dll
> ...
> ROOT/bin/LibraryN.dll
> ROOT/somedata/data1.file
> ROOT/somedata/data2.file
> ROOT/somedata/data3.file
> 
> or
> 
> ROOT/Application.exe
> ROOT/Library1.dll
> ...
> ROOT/LibraryN.dll
> ROOT/somedata/data1.file
> ROOT/somedata/data2.file
> ROOT/somedata/data3.file.
> 
> Sometimes you may see:
> 
> ROOT/Application.exe
> ROOT/libraries/Library1.dll
> ...
> ROOT/libraries/LibraryN.dll
> ROOT/somedata/data1.file
> ROOT/somedata/data2.file
> ROOT/somedata/data3.file
> 
> but this requires you to provide a config file for the *.exe to tell the CLR
> where to locate assemblies.
> 
> Jarek
> ----- Original Message ----- 
> From: "Met @ Uber" <met@uberstats.com>
> To: "Mono-List" <mono-list@ximian.com>
> Sent: Saturday, November 01, 2003 7:56 PM
> Subject: [Mono-list] Using other Assemblies at Run time
> 
> 
> > I'm writing an application that uses assemblies like log4net which do
> > not belong with the rest for many reasons.  As such, I'm trying to
> > figure out where it belongs.  If this were Java I'd create a lib
> > directory to hold the Jars in the same directory as the EXE, but this
> > isn't Java ;-)
> >
> > So basically, where do I put assemblies I need to be distributed with my
> > application?  I do not want them in the main directory, for neatness,
> > separation, etc.
> >
> > Thanks in advance,
> >
> > ~ Matthew
> >
> > _______________________________________________
> > Mono-list maillist  -  Mono-list@lists.ximian.com
> > http://lists.ximian.com/mailman/listinfo/mono-list
> >
>