ERROR

‘The extension was not able to find the startup entry point for the project.’

Last Published: April 25, 2020

Error Message

Building new ArcObjects SDK for .NET Projects from application project templates returns the following error:

“The extension was not able to find the startup entry point for the project.”

This error occurs only with Visual Studio 2019 when a new project is created using one of the following project templates:

  • Desktop Windows Application
  • Engine Windows Application
  • Desktop Console Application
  • Engine Console Application

After selecting the license to be checked at startup from the Project Template wizard, Visual Studio 2019 displays the following error messages:

Cause

All Application Project Templates use a Visual Studio project template wizard code-behind to insert custom code snippets into the newly created project, for example, the license-checking code.  The cause of the problem is that Visual Studio 2019 is passing a bad (or corrupt) EnvDTE.Project object to one of the project template’s call back functions.  When trying to use the EnvDTE.Project parameter, the error is thrown.  Usually the problem doesn’t occur when creating a new project at startup of Visual Studio 2019, but the project creation consistently fails when project creation is attempted from within an open VS 2019 instance.

Solution or Workaround

To create a new project, you can either try to restart Visual Studio 2019 and try to create a new project at startup, or you can manually update your project’s license startup code as follows:

  1. Insert the following using statement if it is missing:
using ESRI.ArcGIS.esriSystem;
  1. Insert the following snippet into the Program class:
private static LicenseInitializer m_AOLicenseInitializer = new DesktopConsoleApplication4.LicenseInitializer();
  1. Modify the snippet to match your license needs and insert the following snippet into your Main function:
// ESRI License Initializer generated code.
m_AOLicenseInitializer.InitializeApplication(new esriLicenseProductCode[] { esriLicenseProductCode.esriLicenseProductCodeBasic },
new esriLicenseExtensionCode[] { });
// ESRI License Initializer generated code.
// Do not make any call to ArcObjects after ShutDownApplication()
m_AOLicenseInitializer.ShutdownApplication();

Article ID:000022152

Software:
  • AO SDK Microsoft NET Framework 10 8

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Discover more on this topic