Hello, i'm trying to open a gdb workspace from a path, but i keep getting an exception on invoking new FileGDBWorkspaceFactory(). The whole project was made by other people, i'm just trying to run it on my computer so the exact same code works just fine on some colleagues computers, i can't understand what's the actual problem.
The function is really simple:
public static IWorkspace OpenFileGdbWorkspaceFromPath(String path)
{
IWorkspace oWS = null;
try
{
IWorkspaceFactory myworkspaceFactory = new FileGDBWorkspaceFactory();
oWS = myworkspaceFactory.OpenFromFile(path, 0);
}
catch (Exception ex)
{
//handles exception
}
return oWS;
}
And the exception is:
System.InvalidCastException: 'Impossibile eseguire il cast di oggetti COM di tipo 'System.__ComObject' in tipi di interfaccia 'ESRI.ArcGIS.DataSourcesGDB.FileGDBWorkspaceFactory'. L'operazione non è stata completata perché la chiamata QueryInterface sul componente COM per l'interfaccia con IID '{F173FC16-D63A-11D1-AA81-00C04FA33A15}' non è riuscita a causa del seguente errore: Interfaccia non supportata. (Eccezione da HRESULT: 0x80004002 (E_NOINTERFACE)).'
I'm not sure of what informations might be relevant, so please just ask me and i'll try to provide anything i can. Thank you very much