RasterFactory no longer instantiates

posted Jun 16, 2014, 6:28 PM by Lesley Bross
I renamed the application configuration file this morning and for some reason, I can no longer instantiate a RasterFactory. The error message is:
Internal error occurred within the program:
  The type initializer for 'Landis.RasterIO.Gdal.RasterFactory' threw an exception.
  The type initializer for 'Landis.RasterIO.Gdal.GdalSystem' threw an exception.

Stack trace:
   at Landis.RasterIO.Gdal.RasterFactory..ctor()
   at Widgets.Launcher.BtnRun_Click(Object sender, EventArgs e) in C:\Docs\Lesley\Landis\code\branches\lbross\Widgets\Launcher.cs:line 71

I have confirmed with the Fusion Log Viewer that the gdal_csharp.dll is loading correctly. Because the RasterFactory is inside one of the Spatial Modeling .dll's I can't tell what is causing the failure. There are errors on the Fusion Log Viewer about not being able to load the System.Xml assembly which makes no sense because this is a core Windows assembly. I don't know if this is related to the RasterFactory error or not.

The assembly binding entry in my config file:
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <!--<probing privatePath="6.0;build;extensions" /> -->
      <probing privatePath="build" />
      <dependentAssembly>
        <assemblyIdentity name="gdal_csharp"
                          publicKeyToken="db5a52b08dc5b321"
                          culture="neutral" />
        <bindingRedirect oldVersion="1.0.0.0-1.0.65534.65534" newVersion="1.0.4704.32492" />
      </dependentAssembly>
    </assemblyBinding>

I have applied to join the LANDIS-II developers discussion board and will post my question there when I am approved.
Comments