Select to view content in your preferred language

AGS 10 Mobile SDK exception with Window deployment

3846
10
04-28-2011 01:00 AM
Wolf
by Esri Regular Contributor
Esri Regular Contributor
Using the AGS 10 Mobile SDK i am trying to deploy a Mobile windows form application.  I tried to follow the deployment instructions in the help - but they are out dated since the refers to EsriMobile92.dll - which I think is probably wrong.   The program works fine on my developement machine so I made a setup for deployment on other machines (note that all projects are set to a x86 target).  Once I install on other machines I get the following exception:

2011-04-27 22:51:12,065 [1] ERROR  Program Exception
System.TypeInitializationException: The type initializer for 'ESRI.ArcGIS.Mobile.NativeMethods' threw an exception. ---> System.InvalidOperationException: Missing ArcGIS registry key.
   at ESRI.ArcGIS.Mobile.Native.WindowsApi.LoadCore(String dllName)
   at ESRI.ArcGIS.Mobile.NativeMethods..cctor()
   --- End of inner exception stack trace ---
   at ESRI.ArcGIS.Mobile.Map..ctor()
   at MobileGIS.frmMap.InitializeComponent()
   at MobileGIS.frmMap..ctor()
   at MobileGIS.Program.Main()

I was wondering if somebody was able to install a windows mobile application that was build using AGS Mobile SDK on a Window 7-64 bit machine.

Thanks
0 Kudos
10 Replies
MaximilianGlas
Esri Contributor
I had have the same problem.
And for us it is also no solution to assume the ArcGIS Mobile SDK installed on every machine, for a build server this is no solution.
To resolve the problem you have to do a few steps:


  1. Change platform to x86 for all projects

  2. Add the c-libraries as content files in your projects (ESRIMobileCore.dll, ESRIMobileGPS.dll, ESRIMobileSdc.dll, pe.dll)

  3. Assume that these files were copied to the output directory when building the project (the files must stay besides the ESRI.ArcGIS.Mobile.dll)


In these case there is no need to install the SDK.
For me this function 🙂
0 Kudos