3

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);
}
Sam
  • 199
  • 1
  • 10
  • Have you deployed the runtime on client's machine? You might also want to look at the [online help] (http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#//0001000002ns000000) – ujjwalesri Jun 21 '11 at 12:00
  • Interesting comment in Esri's blog post about Bind returning a void. Are you calling Bind in a try/catch? – Kirk Kuykendall Jun 21 '11 at 17:18
  • Am calling the whole init in a try catch. I will check the result of bind, thanks for the hint! – Sam Jun 22 '11 at 07:20

2 Answers2

2

I would check to see what license the customer's computers runs. I would run ArcGIS Administrator on both machines and compare the licenses installed.

Swicker
  • 106
  • 2
2

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?

Goldorak84
  • 1,274
  • 9
  • 27
  • Great idea, I'll check the InstalledRuntimes! – Sam Jun 22 '11 at 07:26
  • You hit gold! The client had desktop installed, and the ESRI support #1 told me there is no difference while #2 told me "well, they might need to be initialized differently, using a different bind or product". Now am checking with the customer how to resolve this. – Sam Jun 24 '11 at 14:32