ThinkGeo.com    |     Blog    |     Wiki    |     Support

Issue reading GDB files

Hi,

I am trying to open up a gdb file by setting up a FileGeoDatabaseFeatureLayer but when its Open() function is called, the application returns errors like

InnerException = {“Could not load file or assembly ‘Esri.FileGDBAPI.DLL’ or one of its dependencies. The specified module could not be found.”:“Esri.FileGDBAPI.DLL”}

…\Esri.FileGDBAPI.DLL’. Cannot find or open the PDB file.

Have I missed a step in the set up ?
I have recently upgraded the application from v9 to v10.

Cheers,

Atif

Hi Atif,

The FileGeoDatabaseFeatureLayer requires MapSuiteDependency-EsriFileGeoDatabase, it will be installed automatically when you install “ThinkGeo.MapSuite.Layers.FileGeoDatabase” NuGet package. Please confirm if your project installed this package.

If there is still issue, please let us know that.

Thanks
Mark

Hi Mark,

I have checked the installations and I was on .NET 4.5.2 but the others matched. I have switched to .NET 4.5 and reinstalled the MVCSuiteWebForMvc-Standard (10.2.3). Now, I have 10.2.1 of MapSuiteDependency-EsriFileGeoDatabase and 10.2.8 of Thinkgeo.MapSuite. The issue is still there.

One thing to point out is that I am on a 64bit Windows 10 machine and it is trying to open up the x86 version instead of the x64 version as you can see below
\bin\Windows-X86\EsriFileGeoDatabase\Esri.FileGDBAPI.dll’. Cannot find or open the PDB file.

There are also no PDB files there.

Cheers,

Atif

Hi Atif,

Could you please create a simple sample which can reproduce it in your machine, so our developer can test it and see where is the problem, please follow this guide to do that quickly: http://wiki.thinkgeo.com/wiki/map_suite_project_template_guide

Regards,

Ethan

Hi Ethan,

I have picked up one of the ThinkGeo sample MVC projects and installed the MapSuiteWebForMvc-Standard and then tried to open a sample GDB file in the index function to see if it opens. It gives me a similar error to what I’m getting in my project.

You will find the following code in the DefaultController.cs file
FileGeoDatabaseFeatureLayer fileGeoDatabaseFeatureLayer = new FileGeoDatabaseFeatureLayer("…/…/AppData/Shapes.gdb", “states”);
fileGeoDatabaseFeatureLayer.Open();

The project has been placed at this link
https://wetransfer.com/downloads/93bf22b717a72305f19139a2760979da20180322235205/31cc0a3e94153b6eeeac4f6d76505d6320180322235205/df0081

Cheers,

Atif

Hi Atif,

We reproduced it, our developer will look into this problem, any update I will let you know.

Regards,

Ethan

Hi,

Any update on this ?

Cheers,

Atif

Hi Atif,

It looks this problem cannot be fixed quickly, because it’s a known issue from ESRI, you can view more detail information here: https://community.esri.com/thread/91174. Our developer find a workaround for you, as below is the steps:

  1. Install two packages in NuGet:

ThinkGeo.MapSuite.Layers.FileGeoDatabase
MapSuiteDependency-EsriFileGeoDatabase

  1. Copy the dlls from

packages\ThinkGeo.MapSuite.Layers.FileGeoDatabase.11.0.0-beta011\lib\net45\ThinkGeo.MapSuite.Layers.FileGeoDatabase.dll

to a special folder, you need add the dll into reference after this package get deleted.

  1. Copy the folder:

packages\MapSuiteDependency-EsriFileGeoDatabase.11.0.0-beta003\build\net45\Windows-X86

to target location:

C:\Windows\SysWOW64\Map Suite 10.0\

  1. Delete the two packages from NuGet, and make sure delete the Windows-X86 and Windows-X64 folder under bin folder.

  2. Build your project and you can see it works.

Here is a sample for it: https://ap.thinkgeo.com:5001/sharing/QviZah9xF

Regards,

Ethan

Hi Ethan,

Thanks for sending over those details. I have followed those instructions but haven’t been able to get the project running. Since your code isn’t running either, it might be something to do with the files I put in this folder
C:\Windows\SysWOW64\Map Suite 10.0\

First, do the DLLs go directly in there or inside subfolders in there ?

Is it supposed to be these 3 DLLs ?
Esri.FileGDBAPI.dll
FileGDBAPI.dll
FileGDBAPID.dll

Cheers,

Atif

Hi Atif,

As below is a more detail version about that, please view it:

  1. Copy the dll
    thinkgeo.mapsuite.layers.filegeodatabase.11.0.0-beta011.nupkg\lib\net45\ThinkGeo.MapSuite.Layers.FileGeoDatabase.dll

any the other folder which won’t be deleted, and then manual add reference in your project
2.
Copy the folder “Windows-X86” and “Windows-X64”, include all the sub items in it from

thinkgeo.mapsuite.layers.filegeodatabase.11.0.0-beta011.nupkg\build\net45\

to

C:\Windows\SysWOW64\Map Suite 10.0\

Copy the folder “Windows-X86” and “Windows-X64”, include all the sub items in it from

mapsuitedependency-esrifilegeodatabase.11.0.0-beta003.nupkg\build\net45\

to

C:\Windows\SysWOW64\Map Suite 10.0
4. Delete the two packages from NuGet, and make sure delete the Windows-X86 and Windows-X64 folder under bin folder.

Regards,

Ethan

Hi Ethan,

Thanks for your help on this issue. The application is working after all the DLLs have been moved. I am guessin I’ll need to do the same when I go to deploy the application on the server.

Cheers,

Atif

Hi Atif,

I am glad to hear that’s helpful.

Yes you should want to check the items when you deploy.

Regards,

Ethan