I developed a relatively simple web app that uses the C# OGR bindings to do a couple of simple geometric functions; buffer, clip...etc. I developed this application on my local machine, which has FWTools installed, so getting everything to play nicely wasn't very difficult.

Naturally, when I deployed this application to the server nothing worked, undoubtably due to the all of the missing associated dependencies for the C# bindings. Is there anyway I can include all needed files in the bin folder of this application? Or is that more trouble than its worth, and I should just install FWTools on the server?

2 Answers 2


If it is a one-off install, I would just install FWTools and be done with it. There are a number of moving pieces that you'll need to make sure you bring along, including GDAL_DATA files, path settings, and multiple DLL dependencies.

If you need something that is dependably redeployable on multiple servers, it might be worth the effort to build a package from an existing FWTools or OSGeo4W install. Another option might be to use Tamas' GDAL SDKs, which might get you something that is single-directory deployable.


  • Just in case anyone still comes across this question, note that FWTools is no longer kept up to date in terms of GDAL/OGR version. That said, for a lot of purposes I'm sure the existing FWTools are still of use to a lot of people. May 1, 2014 at 13:53

I took this a little further and did what Howard Butler suggests. Using the build at "vbkto dot dyndns dot org slash sdk" I was able to successfully run GDAL in .NET without any nasty external dependencies.

It required me to programmatically set up configuration and some environment variables for GDAL.

I have written about it here http://bjarte.com/post/gdal-in-csharp


The DotSpatial project on CodePlex has both 32 and 64 bit assemblies for GDAL integration. The code that actually configures GDAL can be found here. It might be the most up-to-date way to GDAL integration in .NET as the project is very active.

  • BjartN, this is really interesting. I'm looking to do the same thing for java -- ideally, I'd be able to deploy GDAL in a custom jar file, with all dependencies taken care of. What are your thoughts? Or would it make more sense to just go ahead and install gdal in the machine, then package the bindings themselves? Jan 18, 2011 at 18:26
  • I realize this is a very old post, but the link to your blog post is broken. Any chance you can update the link? It would much appreciated.
    – GeoSharp
    May 4, 2018 at 20:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.