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 ==========

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