App.Path in VB .NET, Help Please??

Discussion created by Nahide on Jan 12, 2012
Latest reply on Jan 12, 2012 by twhiteaker

I have a code in vb6 that I'm upgrading to VB.Net as an ESRI Add-In. It has a config.ini file that the user can modify because we would like to use this office wide connecting to different sql servers. Anyway I cannot get the add-in to find its config.ini file.

I've already tried

path = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly.Location)


Module modAppInfos
Public Function App_Path() As String
App_Path = CStr(Nothing)
App_Path = System.Reflection.Assembly.GetExecutingAssembly.GetName().CodeBase
If StrComp(LCase(Left(App_Path, 8)), "file:///") = 0 Then
App_Path = Mid(App_Path, 9) 'file:/// entsorgen
End If
App_Path = StripFileName(App_Path)
End Function
End Module

And neither of them worked.
Any help would be welcome.