How do I get the directory of the class library

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am building an application that uses a windows service that calls a .net
class library. From within the class library, how do I get the directory of
the class library ?

Thanks,
Craig
 
Craig said:
I am building an application that uses a windows service that calls a
.net class library. From within the class library, how do I get the
directory of the class library ?

The class library will either be in the process's folder (or a folder
underneath that) or in the GAC. You should *not* install libraries
anywhere else.

If it's in the GAC then you should not be concerned with the 'directory'
of the library because that is an implementation detail of how the GAC
works.

Every assembly has a CodeBase property that gives the location of the
assembly, but I am unsure why you would need to know this. The reason is
that you really should allow Fusion to handle the location of
assemblies.

Richard
 
Back
Top