Problems with RuntimeManager and ProductCode Classes in ESRI.ArcGIS

8957
17
07-17-2014 08:17 AM
AngelicaMaria_Gomez
New Contributor

Hi

I'm trying to run a stand-alone application using ArcObjects, C# and SQLServer Express. I have an ArcGIS 10.2 Desktop license, then I did the following to bind the application:

I found the ArcGIS Version dll  (ArcGISVersion.dll) in C:\Program Files\Common Files\ArcGIS\bin\

I added the reference to this dll into my application

I included the namespace: using ESRI.ArcGIS in the class before to use any ArcObjects class.

I use the next instruction to bind the application:

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

The problem is I can't run the program, the compiler launched an error, RuntimeManager and ProductCode don't belong to ESRI.ArcGIS namespace and probably there is a missing assembly.

I also downloaded and install ArcGIS Runtime SDK for .NET I found in ArcGIS for Developers‌.

I hope somebody can help me with this.

Thanks

0 Kudos
17 Replies
nicogis
MVP Frequent Contributor

see this: Bind and License your standalone ArcGIS Engine or Desktop application | ArcGIS Blog

You don't need ArcGIS Runtime SDK for .NET because it don't reference arcobjects.

0 Kudos
AngelicaMaria_Gomez
New Contributor

Hi Domenico

I know that, but the rest of my application use ArcObjects. The problem is with RuntimeManager and ProductCode classes. I'm not sure if there is a missing assembly because according to ArcObjects 10 .NET SDK Help‌, I don't need anything else but the code doesn't run

0 Kudos
nicogis
MVP Frequent Contributor

In tab Build -> Platform target -> Have you set x86?

0 Kudos
AngelicaMaria_Gomez
New Contributor

I have a 64 bit processor and installation, but I also try this and the error is still there, this happens in the compilation process.

0 Kudos
nicogis
MVP Frequent Contributor

if you have 64bit you need set x86.

The assembly name is ESRI.ArcGIS.Version but the namespace is only ESRI.ArcGIS

using ESRI.ArcGIS;

0 Kudos
AngelicaMaria_Gomez
New Contributor

Thanks for the information about setting the application

Did you mean that the correct instruction is

ESRI.ArcGIS.Version.RuntimeManager.Bind(ESRI.ArcGIS.Version.ProductCode.Desktop) ?

Because it doesn't work either

inside ESRI.ArcGIS I only have this

esriSystem

DataSourcesFile

DataSourcesGDB;

DataSourcesOleDB

DataSourcesRaster

Display

esriSystem

Geodatabase

GeoDatabaseExtensions

Geometry

Server

SystemUI

None of them have a Version namespace, even there is a document that say so: http://help.arcgis.com/en/sdk/10.0/Arcobjects_net/pdf/VersionObjectModel.pdf

I also checked the documentation of ESRI.ArcGIS namespace and on this link: ArcObjects 10 .NET SDK Help

the content is different to the content I have when I include the namespace into the program.

I also try with this instruction: "RuntimeManager.Bind(ProductCode.Desktop);" and add all the namespaces from ESRI.ArcGIS, but nothing change

0 Kudos
nicogis
MVP Frequent Contributor

Can you do print screen of Solution Explorer of reference of your project and part of source code with using ?

0 Kudos
AngelicaMaria_Gomez
New Contributor

Hi again

I attached the print screen. The code is quite simple because I separate this from the rest. Thanks a lotProblem_Geodatabase.png trying to find a solution

0 Kudos
nicogis
MVP Frequent Contributor

The path of dll is C:\Program Files (x86)\ArcGIS\DeveloperKit10.2\DotNet\ESRI.ArcGIS.Version.dll. It's registered in gac so you should see:VersionDllAO.png

0 Kudos