[gdal-dev] RegisterAll for gdal/ogr Throws an exception in C-sharp

Rubina Sultan rubinasultan at gmail.com
Wed Jul 8 23:43:29 EDT 2009


Hello All,

I am working on display of S57 vector data using C# ,  visual studio 2005.
The Operating system is Xp. The library is gdal/ogr . As a first step, I am
able to use c-sharp swig binding dll as obtained from FWtool 2.4.2...

I have included the required c-sharp dll's in reference of my project.  I
have also placed all wrap dll's and other dll's found in bin of FWTools in
the bin of my application project and the code is compiling well.

 The code I am trying to execute is ogrinfo from c-sharp sample of gdal/ogr
as in the follwoing link while the error is produced on line
70:  Ogr.RegisterAll();

http://trac.osgeo.org/gdal/browser/trunk/gdal/swig/csharp/apps/ogrinfo.cs

When I execute it, the first function (Register All) of gdal/ogr throws an
exception. the error is: ""The type initializer for 'OSGeo.OGR.Ogr' threw an
exception."  "

The issue is somewhat similar to the posted in the following links.
http://n2.nabble.com/question-about-ogr-td2034353.html#a2034353

 <http://trac.osgeo.org/gdal/browser/trunk/gdal/swig/csharp/apps/ogrinfo.cs>

Please help me in rectifying the issue.
-- 
Thanks & Regards
Rubina Sultan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20090709/cb1b6b1a/attachment-0001.html


More information about the gdal-dev mailing list