AnsweredAssumed Answered console application does not close

Question asked by jsn on Jan 24, 2019
Latest reply on Jan 24, 2019 by jsn

Hello everyone,


When I run 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("This application could not initialize with the correct ArcGIS license and will shutdown.")



End If

Console.WriteLine("Start Processingon " & DateTime.Now.ToShortDateString)




'ESRI License Initializer generated code.

'Do not make any call to ArcObjects after ShutDownApplication()




Console.WriteLine("Completed Processing on " & DateTime.Now.ToShortDateString)



End Sub

End Module