Select to view content in your preferred language

Problems with RuntimeManager and ProductCode Classes in ESRI.ArcGIS

10317
17
07-17-2014 08:17 AM
AngelicaMaria_Gomez
Deactivated User

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 Alum

What's the version of the .NET Framework that your project to target ?

0 Kudos
AngelicaMaria_Gomez
Deactivated User

In references section appear ArcGISVersionLib instead ESRI.ArcGIS.Version. The version of the target framework is

.NET Framework 4.5

ArcGIS_Reference_Adding.bmp.jpg

These are the properties that appear

properties.bmp.jpg

This is a view of properties section in references

ArcGISVersion_Add.bmp.jpg

I checked the file Interop.ArcGIS.Version in the location mentioned in properties and it is on it.

0 Kudos
nicogis
MVP Alum
0 Kudos
AngelicaMaria_Gomez
Deactivated User

I got it. I configured the target framework to 3.5.Thanks

0 Kudos
AlexZebrev
Deactivated User

You shouldn't be referencing ArcGisVersion.dll in your project since it is a COM dll and not a .NET assembly. This is why you have these errors during compilation. The correct file to reference is ESRI.ArcGis.Version.dll located in the same folder.

0 Kudos
AngelicaMaria_Gomez
Deactivated User

I couldn't find this dll. I searched it in the entire disk actually and I couldn't find it. Then I find  ArcGISVersion.dll as the closer dll. Then I don't know what to do

0 Kudos
nicogis
MVP Alum

To determine which ArcGIS products are installed, can you run PatchFinder utility ?

0 Kudos
nicogis
MVP Alum

Have you installed sdk arcobjects?

0 Kudos