[GIS] App using ArcGis Engine throws error at customers

arcgis-engine

I developed a program using the ArcGIS Engine 10.0. On my development computer it runs nicely, but when I deploy the binary to the customer computer the program throws an exception when trying to initialize the license.

The exception: "ArcGIS version not specified. You must call RuntimeManager.Bind before creating any ArcGIS components."

This error does show after I called RuntimeManager.Bind, and I'm quite sure I did not accidentially instanciate any other ArcGIS objects before calling RuntimeManager.Bind.

How can I find the source of this problem? Why does it only show up at the customer?

The code I'm using to initialise:

ESRI::ArcGIS::RuntimeManager::Bind(ESRI::ArcGIS::ProductCode::Engine);
ESRI::ArcGIS::esriSystem::AoInitialize^  aoi = gcnew ESRI::ArcGIS::esriSystem::AoInitializeClass();

ESRI::ArcGIS::esriSystem::esriLicenseProductCode productCode = ESRI::ArcGIS::esriSystem::esriLicenseProductCode::esriLicenseProductCodeEngine;
if (aoi->IsProductCodeAvailable(productCode) == ESRI::ArcGIS::esriSystem::esriLicenseStatus::esriLicenseAvailable)
{
  aoi->Initialize(productCode);
}

Best Answer

Does the client have ArcGIS 10? Maybe you're trying to bind a Runtime product when the client has desktop installed? Do you use the RuntimeManager::InstalledRuntimes property to determine which product to bind?

Related Question