Hello everyone,
When I run vb.net Esri Console application, inside visual studio it works fine and it exist with code 0, but when I run the .exe alone it does not escape and it stays blocked in the Command Prompt window.
Module Module1
Private m_AOLicenseInitializer As LicenseInitializer = New LicenseInitializer()
<STAThread()> _
Sub Main()
'ESRI License Initializer generated code.
If (Not m_AOLicenseInitializer.InitializeApplication(New esriLicenseProductCode() {esriLicenseProductCode.esriLicenseProductCodeAdvanced},
New esriLicenseExtensionCode() {})) Then
Console.WriteLine(m_AOLicenseInitializer.LicenseMessage())
Console.WriteLine("This application could not initialize with the correct ArcGIS license and will shutdown.")
m_AOLicenseInitializer.ShutdownApplication()
Return
End If
Console.WriteLine("Start Processingon " & DateTime.Now.ToShortDateString)
InitializeData()
'ESRI License Initializer generated code.
'Do not make any call to ArcObjects after ShutDownApplication()
m_AOLicenseInitializer.ShutdownApplication()
Console.WriteLine("Completed Processing on " & DateTime.Now.ToShortDateString)
End Sub
End Module