Hello,
On my PC with ArcGIS Pro 3.4 and VS 2022 I made an CoreHost C# x64 application. The assemblies ArcGIS.Core and .CoreHost are Copy Local = Yes and Specific Version = No.
My colleague runs ArcGIS Pro 3.1.3 and the app - after installing .Net 8 - can't open a file geodatabase (but I can!). Instead he gets this errormessage:
System.Runtime.InteropServices.SEHException (0x80004005): External component has thrown an exception.
at ArcGIS.Core.Internal.Interop.GetInterface(Guid& id, Object& obj)
at ArcGIS.Core.Internal.Interop.get_Geodatabase()
at ArcGIS.Core.Data.GeodatabaseUtil.OpenDatastore(String path)
at ArcGIS.Core.Data.Geodatabase.Open(Uri uri)
at ArcGIS.Core.Data.Geodatabase..ctor(FileGeodatabaseConnectionPath connectionPath)
at (my code)
Uri uri = new(fgdbPath);
Geodatabase geodatabase = null;
if (fgdbPath.EndsWith(".gdb"))
{
FileGeodatabaseConnectionPath connPath = new(uri);
geodatabase = new(connPath); // --- here the code breaks ---
}
else if (fgdbPath.EndsWith(".geodatabase"))
{
MobileGeodatabaseConnectionPath connPath = new(uri);
geodatabase = new(connPath); // here the code breaks I suppose (but not tried)
}
My question:
- does it have anything to do with the older ArcGIS Pro version? If so, what should I do, unless upgrading all ArcGIS Pro installations?
Many thanks,
Pieter
Solved! Go to Solution.
3.1.3 was .NET 6. he will need to recompile against the .3.1 assemblies.
3.1.3 was .NET 6. he will need to recompile against the .3.1 assemblies.
Thanks for your answer. After a few days off the office, I've found a workaround: running the program on a virtual server with 3.4 which my colleague can access. I do not have administrative rights so for me this is the only way.