Hi,
I'm also trying to get the path a DLL is located.
I am using:
string path = System.Reflection.Assembly.GetAssembly(this.GetTyp e()).Location;
This give path a value of:
C:\Program Files\Microsoft Dynamics\GP\AddIns\Workflow.dll
Which is great, but I don't want the "Workflow.dll" part of the path.
Is there a different call I can use to bring back just:
C:\Program Files\Microsoft Dynamics\GP\AddIns\
Or is there a way I can strip out the "Workflow.dll" part of the path
without hard-coding the DLL name.
Thanks,
Ed
"Ignacio Machin ( .NET/ C# MVP )" wrote:
Hi,
Arey ou talking about a .net assembly ?
If so you can use Assembly.Location , all you need to do is get a reference
to the assembly you are interested in.
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"Tim" <Ti*@discussions.microsoft.comwrote in message
news:58**********************************@microsof t.com...
Hi,
How can I find the path in which a dll is executing from? I do not want
the Exe path. Is there a way to get the dll path in C# - something like
the
output of GetModuleFileName API ?