AGS 10 Mobile SDK exception with Window deployment

3589
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
StephenDickinson
Esri Contributor
You mention that you have configured all the projects in VS.NET to build for x86 target.  This is necessary.

You may also need to ensure that the ArcGIS Mobile Windows application or the SDK is installed on the machine to provide the necessary key.
0 Kudos
Wolf
by Esri Regular Contributor
Esri Regular Contributor
Stephen, thanks for your reply

You mention that you have configured all the projects in VS.NET to build for x86 target.  This is necessary.


I made sure of this.

You may also need to ensure that the ArcGIS Mobile Windows application or the SDK is installed on the machine to provide the necessary key.


Do you mean that i need to install the Mobile software on each device where I want to deploy my custom application on (built using the Mobile SDK) ?  My AGS Mobile 9.3 custom applications didn't require any additional software installation I was able to solely deploy the custom app.
0 Kudos
StephenDickinson
Esri Contributor
Do you mean that i need to install the Mobile software on each device where I want to deploy my custom application on (built using the Mobile SDK) ?  My AGS Mobile 9.3 custom applications didn't require any additional software installation I was able to solely deploy the custom app.


It was the same at 9.2, you could deply without any additional software installation.  However, it seems at 10 you need to somehow get the key that "Missing ArcGIS registry key" refers to onto the machine.  This seems to be achieved by installing the ArcGIS Mobile Windows application.  I'm not sure how to achieve this otherwise.
0 Kudos
Wolf
by Esri Regular Contributor
Esri Regular Contributor
I found another forum thread about "Mobile runtime deployment" http://forums.arcgis.com/threads/11516-Deploying-mobile-runtime?highlight=mobile+deployment this thread contains a link to a word document with the Windows deployment instructions.  There's no registry key that needs to be set - turns out that some missing dlls are causing this misleading error message.
0 Kudos
RaúlMalpica
New Contributor
Hello all:

I'm facing with the same problem. It was partially solved following the link above. I'm mean, I was
able to deploy an application (exe) in a Windows 7 (64 bits) PC. It worked just copying this DLLs
in the same folder than the exe file and ESRI.ArcGIS.Mobile.dll:

ESRIMobileCore.dll
ESRIMobileGPS.dll
ESRIMobileSdc.dll
pe.dll

Extracted from C:\Program Files\ArcGIS\Mobile10.0\bin

With this configuration an exe file works correctly. But now We am having another problem. My company is developing an Arcgis Mobile based control with Visual Studio 2008 for another company.
They  haven't installed the Mobile SDK, when they try to add the control to an empty form this error is displayed.

We have reproduced it in another PC without Mobile SDK. This error occurs even adding the DLLs to the same path of ESRI.ArcGIS.Mobile.dll

Any idea?

Best regards
0 Kudos
MelindaFrost
Occasional Contributor
If you want to add ESRI Mobile controls in Visual Studio 208 you will have to install the Mobile SDK.
0 Kudos
RaúlMalpica
New Contributor
We prefer not to force the other company to install the SDK. Two years ago we developed
together the prototype of this application using Arcgis Mobile 9.2 and they did not have to
install the SDK, we just sent them our custom control (DLL) and two ESRI DLLs ESRI.ArcGIS.Mobile.dll and ESRIMobile92.dll. This was enough for them to add our control to their project and it worked corretly.

If there is no other way we'll ask them to install the Mobile SDK

Thanks for your response

Best regards
0 Kudos
MelindaFrost
Occasional Contributor
I would review your license agreement. I am pretty sure it will have something in there about to use the controls you need a ESRI Mobile SDK license.
0 Kudos
chrisksepka
New Contributor
If it helps, I have a custom ArcGIS Mobile for Windows application.  It was getting the "type initializer for 'ESRI.ArcGIS.Mobile.SpatialReferences.NativeMethods' threw an exception" error on my windows 7 machine, and failing to open.  After installing the ArcGIS Mobile 10.0 SDK, the error went away and it started working.
0 Kudos