retrieving path for a class library

  • Thread starter Thread starter Roger
  • Start date Start date
R

Roger

How do you create the path the class library resides in. Using the
Environment.CurrentDirectory does not always pull the physical path that the
DLL resides in when the DLL is called from Biztalk. The path is
C:\windows\system32. Byt I have my dll somewhere else. Is there a property
that can pull the directory the dll physically resides in?>
 
Roger,

You can get the Assembly instance for the DLL and then use the CodeBase
property. Note, that if the assembly is loaded from the GAC, the CodeBase
property is not guaranteed to be populated, but the Location property is.

For more details, see the following blog entry from Suzanne Cook on the
matter:

http://blogs.msdn.com/suzcook/archive/2003/06/26/57198.aspx
 
Back
Top