We are in the process of upgrading our application from x86 to x64. We use MapSuite Desktop Edition and I currently have the daily Production build 6.0.0.352. I can seem to get the MapSuiteFdoExtensionx64 merge module which is built with version 3.7 of the Gdal to run. I am attempting to open a "ADRG" map file as a GdalRasterLayer. Below is a stack trace from the exception:
[10] 2013-05-13 11:06:23,111 ERROR STTI.FAC.MapControl2d.MapControl2DMapSuite Unable to Load a Map Layer. Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> OSGeo.FDO.Common.Exception: FDO Provider 'OSGeo.Gdal.3.5' Not Registered
at OSGeo.FDO.IConnectionManagerImp.CreateConnection(String providerName)
at MapSuiteFdoExtension.GeoFdoRasterSource.Open(String providerName, String connectionString, String featureSchemaName, String featureClassName, String rasterColumnName)
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
at ThinkGeo.MapSuite.Core.FdoRasterSource.OpenCore()
at ThinkGeo.MapSuite.Core.RasterSource.Open()
at ThinkGeo.MapSuite.Core.RasterLayer.OpenCore()
at ThinkGeo.MapSuite.Core.Layer.Open()
at STTI.FAC.MapControl2d.MapControl2DMapSuite.OpenLayer() in D:\P4V\richard.styer_STTI_dev\STTI\Trunk\MapControl2d\MapSuiteSrc\MapSuite.PrintExtensions.cs:line 589
I have also attempted to open the "ADRG" file using a daily development build 6.0.311.0 but it also thrown an exception:
[10] 2013-05-13 09:41:19,698 ERROR STTI.FAC.MapControl2d.MapControl2DMapSuite Exception in Timer Tick event while refreshing the Map2D. Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Exception: Can not read the image file.
at MapSuiteFdoExtension.GeoFdoRasterSource.GetScaledBitmap(Double centerX, Double centerY, Int32 overlapWidth, Int32 overlapHeight, Int32 returningWidth, Int32 returningHeight)
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
at ThinkGeo.MapSuite.Core.FdoRasterSource.rBM=(Double rRM=, Double rhM=, Int32 rxM=, Int32 sBM=, Int32 sRM=, Int32 shM=)
at ThinkGeo.MapSuite.Core.FdoRasterSource.GetImageCore(RectangleShape worldExtent, Int32 canvasWidth, Int32 canvasHeight)
at ThinkGeo.MapSuite.Core.RasterSource.GetImage(RectangleShape worldExtent, Int32 canvasWidth, Int32 canvasHeight)
at ThinkGeo.MapSuite.Core.RasterLayer.DrawCore(GeoCanvas canvas, Collection`1 labelsInAllLayers)
at ThinkGeo.MapSuite.Core.Layer.Draw(GeoCanvas canvas, Collection`1 labelsInAllLayers)
at ThinkGeo.MapSuite.DesktopEdition.LayerOverlay.DrawCore(GeoCanvas canvas)
at ThinkGeo.MapSuite.DesktopEdition.Overlay.rRM=(GeoCanvas rhM=)
at ThinkGeo.MapSuite.DesktopEdition.Overlay.Draw(GeoCanvas canvas)
at ThinkGeo.MapSuite.DesktopEdition.WinformsMap.1BU=(IEnumerable`1 1RU=)
at ThinkGeo.MapSuite.DesktopEdition.WinformsMap.0hU=(RectangleShape 0xU=)
at ThinkGeo.MapSuite.DesktopEdition.WinformsMap.IRY=()
at ThinkGeo.MapSuite.DesktopEdition.WinformsMap.HRY=(Int32 HhY=)
at ThinkGeo.MapSuite.DesktopEdition.WinformsMap.Refresh()
at STTI.FAC.MapControl2d.MapControl2DMapSuite.timerRefresh_Tick(Object sender, EventArgs evtArgs) in D:\P4V\richard.styer_STTI_dev\STTI\Trunk\MapControl2d\MapSuiteSrc\MapSuite.EventHandlers.cs:line 69
I can get the "ADRG" file to display if I regress back to the MapSuiteFdoExtension using the Gdal 3.5. However I have to add the following to the app.config file:
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
<requiredRuntime version="v4.0.20506" />
</startup>
because of the following exception:
[11] 2013-05-13 09:46:44,455 ERROR STTI.FAC.MapControl2d.MapControl2DMapSuite Unable to Load a Map Layer. Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IO.FileLoadException: Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information.
at MapSuiteFdoExtension.GeoFdoRasterSource.Open(String providerName, String connectionString, String featureSchemaName, String featureClassName, String rasterColumnName)
--- End of inner exception stack trace ---
Does anyone have any idea why the GDAL 3.7 is giving these exceptions? I assume that since I can get the newer FDO merge module to run with either a Development or Production build that I will not be able to upgrade to MapSuite Desktop Editon 7.0.0.0 when it becomes available.
Thanks for any input.
Richard