Select to view content in your preferred language

The type initializer for 'ESRI.ArcGIS.Mobile.NativeMethods' threw an exception.

4605
6
12-26-2009 01:42 PM
MarcoWagemakers
Regular Contributor
Hello,

This evening I met some problems in developing my first mobile applications. Just a simple Windows Form, Mobile Map Control and Map Cache.

When I did start the application in Visual Studio 2008, there is an exception:
{"The type initializer for 'ESRI.ArcGIS.Mobile.NativeMethods' threw an exception."}

As an Attachment a screendump of the exception. Is there any solution for this problem?

My system: Windows 7 Ultimate 64 bits

Marco Wagemakers
ESRI Nederland
0 Kudos
6 Replies
MarcoWagemakers
Regular Contributor
Some additional information:
The error: Missing ArcGIS registry key
0 Kudos
TungweiCheng
Emerging Contributor
We are supporting SDK and Windows applications to run on 64-bit O.S in 32-bit compatible mode (X86). Currently we�??re not supporting native 64-bit compilation for the SDK. If you are developing mobile SDK applications on a 64-bit machine, please follow the steps outlined below to compile your applications correctly.

1. In Visual Studio, inside project property, select X86 in platform target. By default it is set to Any CPU.
2. Compile the solution. You should be able to run the application on 64 bit machine now.

Mobile Team
0 Kudos
EddieJesinsky
Deactivated User
I'm glad I found this! I was following the Mobile tutorials and could not figure out why I was getting this error.
0 Kudos
davidrenz
Deactivated User
How about support for XBAP (WPF in a browser)?

I am getting this error as part of an XBAP.  The app runs well on my local machine, but does not seem to want to play on remote machines.


Error is:

System.Windows.Markup.XamlParseException: Failed object initialization (ISupportInitialize.EndInit). The type initializer for 'ESRI.ArcGIS.Mobile.NativeMethods' threw an exception.  Error at object 'MapControl' in markup file 'ESRI.ArcGIS.Mobile;component/wpf/map.xaml'.
---> System.TypeInitializationException: The type initializer for 'ESRI.ArcGIS.Mobile.NativeMethods' threw an exception.
---> System.InvalidOperationException: Missing ArcGIS registry key.
0 Kudos
FabianHeredia
Emerging Contributor
We are supporting SDK and Windows applications to run on 64-bit O.S in 32-bit compatible mode (X86). Currently we�??re not supporting native 64-bit compilation for the SDK. If you are developing mobile SDK applications on a 64-bit machine, please follow the steps outlined below to compile your applications correctly.

1. In Visual Studio, inside project property, select X86 in platform target. By default it is set to Any CPU.
2. Compile the solution. You should be able to run the application on 64 bit machine now.

Mobile Team


this solution, don't function
my pc is 32X,  modify type ejecution and dll esri mobile has problem
0 Kudos
EzequiasRodrigues_da_Rocha
Regular Contributor
I'm getting this message also in a 32bit machine (a Tablet with Win 7).

Any suggestion people?

ps: Is there any runime without the SDK?

Sincerely
Ezequias Rocha
0 Kudos