Ignacio Machin ( .NET/ C# MVP ) wrote:
Hi,
function must I use to get the directory of the DLL file ?
Inside you dll, do the following:
string location = typeof(AClassInYourDll).Assembly.Location
You can do Assembly.GetExecutingAssembly().Location , in this case you do
not need a type
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
Hmm... still have problem using this...
Assembly.GetExecutingAssembly().Location
Does NOT return the correct path to my dll directory.
When running on a ASP.NET server it reurns:
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temp orary ASP.NET
Files\Development\80fad5dd\dd8b6fcb\assembly\dl3\a 16593d5\7f90b94c_6f0ac601\MyLIB.DLL
Not in my case:
c:\development\web\bin\
Any other ideas?