[mapguide-users] The type initializer for 'OSGeo.MapGuide.MapGuideApiPINVOKE' threw an exception

Hans Milling hm at geograf.dk
Tue May 27 23:40:25 PDT 2014


This error is usually due to a problem loading the MapGuide DLL files.
1. Make sure that your MapGuide/AIMS files (From www\mapviewernet)has been
signed (tool is included with MaestroAPI) and is included in your project.
2. Make sure, if your application is compiled as x86 that the dll files are
from the 32 bit version of MapGuide. If your application is AnyCPU make sure
that whatever platform (32 or 64) the application is running at, the
corresponding dll files are present.
3. Check that all the files from the MapGuide API is present in your
applications bin\debug folder (when debugging). The reference to the
standard OSGeo.MapGuide.MaestroAPI, Foundation, Geometry dll files in visual
studio, will not copy all of the necessary files to the bin\debug folder
when you compile the project. Copy all of the MaestroAPI/SDK files to your
applications bin\debug folder manually.
Use Dependency Walker to check that all files needed are present.
If you create an installer for your application, be sure to include the
files there also.

Best regards
  Hans Milling...




--
View this message in context: http://osgeo-org.1560.x6.nabble.com/The-type-initializer-for-OSGeo-MapGuide-MapGuideApiPINVOKE-threw-an-exception-tp5098741p5142852.html
Sent from the MapGuide Users mailing list archive at Nabble.com.


More information about the mapguide-users mailing list