Skip to content

Instantly share code, notes, and snippets.

@jonathansamines
Created July 8, 2013 18:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jonathansamines/5951170 to your computer and use it in GitHub Desktop.
Save jonathansamines/5951170 to your computer and use it in GitHub Desktop.
Obtiene el directorio en donde un ensamblado está ejecutandose.
Public ReadOnly Property AssemblyDirectory() As String
Get
Dim codeBase As String = Assembly.GetExecutingAssembly().CodeBase
Dim uriBuilder As New UriBuilder(codeBase)
Dim assemblyPath As String = Uri.UnescapeDataString(uriBuilder.Path)
Return Path.GetDirectoryName(assemblyPath)
End Get
End Property
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment