ERROR

ArcGIS version not specified. You must first bind to an ArcGIS version prior to using any ArcGIS components

Last Published: April 25, 2020

Error Message

When migrating an ArcGIS 9.3 Engine application to ArcGIS 10.x, the following COM exception may be returned at the first call of ArcObjects code, for example, IAoInitialize.Initialize method.

COMException message:
"ArcGIS version not specified. You must first bind to an ArcGIS version prior to using any ArcGIS components."

Cause

This exception is thrown because the standalone Engine application has not bound to an ArcGIS product before calling any ArcObjects code. Runtime binding is a new requirement since ArcGIS 10.0.

Solution or Workaround

The binding is achieved by including the following sample code before invoking any ArcObjects code.

  • For ArcGIS Engine, use the following code:
    [C#]

    Code:
    ESRI.ArcGIS.RuntimeManager.Bind(ESRI.ArcGIS.ProductCode.Engine);


    [VB.NET]

    Code:
    ESRI.ArcGIS.RuntimeManager.Bind(ESRI.ArcGIS.ProductCode.Engine)

  • For ArcGIS Desktop, use the following code:
    [C#]

    Code:
    ESRI.ArcGIS.RuntimeManager.Bind(ESRI.ArcGIS.ProductCode.Desktop);


    [VB.NET]

    Code:
    ESRI.ArcGIS.RuntimeManager.Bind(ESRI.ArcGIS.ProductCode.Desktop)

Article ID: 000011444

Software:
  • ArcObjects SDK Microsoft NET Framework
  • ArcGIS Engine

Receive notifications and find solutions for new or common issues

Get summarized answers and video solutions from our new AI chatbot.

Download the Esri Support App

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options