Search code examples
c#visual-studionugetgdal

GDAL Nuget Guide


Some people in Gdal forum ask me to try the GDAL nuget package. May someone help me regarding how to use the GDAL nuget package at nuget.org and may i know it still need to set up just like use in C++?


Solution

  • how to use the GDAL nuget package at nuget.org and may i know it still need to set up just like use in C++?

    Right on your project, select Manage NuGet Packages..., switch to the Browse tab in the open window, type gdal in the search bar, then click Install button:

    enter image description here

    If you install GDAL to your project you will get the .dll file you need and NuGet also automatically create a GdalConfiguration.cs that you call into to initialize the GDAL paths before starting. The only thing to note is the packages are setup to automatically copy their appropriate GDAL libraries to your output build directory. If you need to deploy the application you'll have to do a bit of extra effort.

    enter image description here

    Besides, you do not need to set up just like use in C++. For some more details info, please check following threads:

    How do I install the GDAL bindings for C#/.NET 4.5.1?

    Exception while using GDAL in C#

    Hope this helps.