ThinkGeo.com    |     Documentation    |     Premium Support

V14.3.0 -- ESRI FileGeoDatabase -- Supporting Files

ThinkGeo Team,

The below files must all be in the *\net8.0-windows otherwise an exception occurs.

One of my applications consist of a WPF Control, which makes use of FileGeoDatabase. When the application is compiled the Esri.FileGDBAPI.dll is copied to the executable directory. However, the other three files are not. It was a half a day before I determined that these three files were missing, because the Exception Message did not state properly what files were missing…

I’d rather not rely on having to remember to manually copy these files. Is there something that can be configured within ThinkGeo to ensure these are copied?

Thanks,
Dennis

09/14/2022 07:30 AM 337,296 Esri.FileGDBAPI.dll
07/25/2017 05:45 PM 11,535,824 FileGDBAPI.dll
07/25/2017 05:45 PM 19,934,160 FileGDBAPID.dll
09/16/2022 07:57 AM 9,298 FileGDB_API_license.txt

2025-03-13 17:04:19,591 ERROR OriStarVision - OriStarVisionCore->clsMapLayerItemCollection.PrepareLayerFromDatabaseGdb:
Unable to get TheFileGeoDatabaseFeatureLayer.LayerNames Collection
Database=C:\OriStar\Chicago\OriStarVisionMapSuite\MapGeoDatabase\Airport.gdb
MapLayer=10000032
Source=ThinkGeo.FileGeoDatabase
TargetSite=System.Collections.ObjectModel.Collection`1[System.String] XUI=(System.String)
StackTrace=   at GRU=.R0I=.XUI=(String gdbPath)
   at ThinkGeo.Core.FileGeoDatabaseFeatureSource.GetTableNames(String fileGeoDatabasePathName)
   at ThinkGeo.Core.FileGeoDatabaseFeatureLayer.GetTableNames(String fileGeoDatabasePathName)
   at OriStarVisionCore.clsMapLayerItemCollection.PrepareLayerFromDatabaseGdb(clsMapLayerItem& oMapLayer) in C:\OriStarMappingIncThinkGeoUI-V14.3.0\OriStarVisionCore\clsMapLayer.cs:line 1499
Message=Could not load file or assembly 'C:\OriStarMappingIncThinkGeoUI-V14.3.0\OriStarVision\bin\Debug\net8.0-windows\Esri.FileGDBAPI.dll'. The specified module could not be found.

System.IO.FileNotFoundException: Could not load file or assembly 'C:\OriStarMappingIncThinkGeoUI-V14.3.0\OriStarVision\bin\Debug\net8.0-windows\Esri.FileGDBAPI.dll'. The specified module could not be found.
File name: 'C:\OriStarMappingIncThinkGeoUI-V14.3.0\OriStarVision\bin\Debug\net8.0-windows\Esri.FileGDBAPI.dll'
   at GRU=.R0I=.XUI=(String gdbPath)
   at ThinkGeo.Core.FileGeoDatabaseFeatureSource.GetTableNames(String fileGeoDatabasePathName)
   at ThinkGeo.Core.FileGeoDatabaseFeature

ThinkGeo Team,

I resolved this by adding the below lines to the executable application *.csproj file.

Dennis

The below lines added to OriStarVision.csproj-->>
  <Target Name="PostBuild" AfterTargets="PostBuildEvent">
    <Exec Command="xcopy /R /Y ..\OriStarVisionCore\bin\Debug\net8.0-windows\Esri.FileGDBAPI.dll     $(TargetDir)" />
    <Exec Command="xcopy /R /Y ..\OriStarVisionCore\bin\Debug\net8.0-windows\FileGDBAPI.dll          $(TargetDir)" />
    <Exec Command="xcopy /R /Y ..\OriStarVisionCore\bin\Debug\net8.0-windows\FileGDBAPID.dll         $(TargetDir)" />
    <Exec Command="xcopy /R /Y ..\OriStarVisionCore\bin\Debug\net8.0-windows\FileGDB_API_license.txt $(TargetDir)" />
  </Target>


ReBuild Results-->>
Rebuild started at 10:05...
1>------ Rebuild All started: Project: OriStarVision, Configuration: Debug Any CPU ------
Restored C:\OriStarMappingIncThinkGeoUI-V14.3.0\OriStarVision\OriStarVision.csproj (in 72 ms).
1>OriStarVision -> C:\OriStarMappingIncThinkGeoUI-V14.3.0\OriStarVision\bin\Debug\net8.0-windows\OriStarVision.dll
1>..\OriStarVisionCore\bin\Debug\net8.0-windows\Esri.FileGDBAPI.dll
1>1 File(s) copied
1>..\OriStarVisionCore\bin\Debug\net8.0-windows\FileGDBAPI.dll
1>1 File(s) copied
1>..\OriStarVisionCore\bin\Debug\net8.0-windows\FileGDBAPID.dll
1>1 File(s) copied
1>..\OriStarVisionCore\bin\Debug\net8.0-windows\FileGDB_API_license.txt
1>1 File(s) copied
========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========
========== Rebuild completed at 10:05 and took 01.621 seconds ==========
1 Like

hi Ben,

I’ve copied my application to a production machine running Windows-11 and am having trouble again with the ESRI FileGeoDatabase.

The exception looks a little different but complaining about the same file not loaded.

There must be some other dependency for ESRI that is on my development machine but missing from the production machine.

Any ideas on what the dependency might be?

Thanks,
Dennis

2025-03-26 18:04:55,773 ERROR OriStarVision - OriStarVisionCore->clsMapLayerItemCollection.PrepareLayerFromDatabaseGdb:
Unable to get TheFileGeoDatabaseFeatureLayer.LayerNames Collection
Database=C:\OriStar\xxx\OriStarVisionMapSuite\MapGeoDatabase\Airport.gdb
MapLayer=10000033
Source=ThinkGeo.FileGeoDatabase
TargetSite=System.Collections.ObjectModel.Collection`1[System.String] VkI=(System.String)
StackTrace=   at GRU=.QEI=.VkI=(String gdbPath)
   at ThinkGeo.Core.FileGeoDatabaseFeatureSource.GetTableNames(String fileGeoDatabasePathName)
   at ThinkGeo.Core.FileGeoDatabaseFeatureLayer.GetTableNames(String fileGeoDatabasePathName)
   at OriStarVisionCore.clsMapLayerItemCollection.PrepareLayerFromDatabaseGdb(clsMapLayerItem& oMapLayer) in C:\OriStarMappingIncThinkGeoUI-V14.3.0\OriStarVisionCore\clsMapLayer.cs:line 1499
Message=Could not load file or assembly 'C:\OriStar\OriStarVision\Debug\net8.0-windows\Esri.FileGDBAPI.dll'. The specified module could not be found.
System.IO.FileNotFoundException: Could not load file or assembly 'C:\OriStar\OriStarVision\Debug\net8.0-windows\Esri.FileGDBAPI.dll'. The specified module could not be found.
File name: 'C:\OriStar\OriStarVision\Debug\net8.0-windows\Esri.FileGDBAPI.dll'
   at GRU=.QEI=.VkI=(String gdbPath)
   at ThinkGeo.Core.FileGeoDatabaseFeatureSource.GetTableNames(String fileGeoDatabasePathName)
   at ThinkGeo.Core.FileGeoDatabaseFeatureLayer.GetTableNames(String fileGeoDatabasePathName)
   at OriStarVisionCore.clsMapLayerItemCollection.PrepareLayerFromDatabaseGdb(clsMapLayerItem& oMapLayer) in C:\OriStarMappingIncThinkGeoUI-V14.3.0\OriStarVisionCore\clsMapLayer.cs:line 1499

Ben,

Using the Microsoft dumpbin.exe tool discovered the below DLL’s were not on the production machine.
MSVCP120.dll
MSVCR120.dll

Copied to \Windows\system32 on the production machine and all works:

Below are the results from dumpbin.exe.

Enjoy,
Dennis

C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.43.34808\bin\Hostx64\x64>DumpBin.exe /dependents C:\OriStarMappingIncThinkGeoUI-V14.3.0\OriStarVision\bin\Debug\net8.0-windows\Esri.FileGDBAPI.dll
Microsoft (R) COFF/PE Dumper Version 14.43.34809.0
Copyright (C) Microsoft Corporation.  All rights reserved.


Dump of file C:\OriStarMappingIncThinkGeoUI-V14.3.0\OriStarVision\bin\Debug\net8.0-windows\Esri.FileGDBAPI.dll

File Type: DLL

  Image has the following dependencies:

    FileGDBAPI.dll
    KERNEL32.dll
    VCRUNTIME140.dll
    api-ms-win-crt-runtime-l1-1-0.dll
    api-ms-win-crt-heap-l1-1-0.dll
    MSVCP140.dll
    mscoree.dll

  Summary

        2000 .data
        2000 .nep
        1000 .pdata
       3C000 .rdata
        1000 .reloc
        1000 .rsrc
       12000 .text

C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.43.34808\bin\Hostx64\x64>DumpBin.exe /dependents C:\OriStarMappingIncThinkGeoUI-V14.3.0\OriStarVision\bin\Debug\net8.0-windows\FileGDBAPI.dll
Microsoft (R) COFF/PE Dumper Version 14.43.34809.0
Copyright (C) Microsoft Corporation.  All rights reserved.


Dump of file C:\OriStarMappingIncThinkGeoUI-V14.3.0\OriStarVision\bin\Debug\net8.0-windows\FileGDBAPI.dll

File Type: DLL

  Image has the following dependencies:

    KERNEL32.dll
    ole32.dll
    OLEAUT32.dll
    MSVCP120.dll
    MSVCR120.dll
    SHLWAPI.dll
    USER32.dll
    ADVAPI32.dll
    WSOCK32.dll

  Summary

       21000 .data
       28000 .pdata
      66A000 .rdata
       44000 .reloc
        1000 .rsrc
      410000 .text
1 Like