xBimTeam / XbimEssentials

A .NET library to work with data in the IFC format. This is the core component of the Xbim Toolkit
https://xbimteam.github.io/
Other
485 stars 172 forks source link

IfcStore.Open cannot find Essent.Interop file #476

Open emilaz opened 1 year ago

emilaz commented 1 year ago

I'm trying to open an IFC with either the EssentModel or the HeuristicModel to save initial loading time. However, it seems that IfcStore has problems opening files with these approaches, telling me the Essent.Interop file can't be found.

Assemblies and versions affected:

XBim.Ifc

Steps (or code) to reproduce the issue:

var startMem = DateTime.Now;
IfcStore.ModelProviderFactory.UseMemoryModelProvider();
var ifcModel = IfcStore.Open(path);
var endMem = DateTime.Now;
Debug.WriteLine($"TOTAL ELAPSED MEM: {endMem-startMem}");
var startHeuristic = DateTime.Now;
IfcStore.ModelProviderFactory.UseHeuristicModelProvider();
var endHeuristic = DateTime.Now;
ifcModel = IfcStore.Open(path);
Debug.WriteLine($"TOTAL ELAPSED HEURISTIC: {endHeuristic-startHeuristic}");
var startEssent = DateTime.Now;
IfcStore.ModelProviderFactory.UseEsentModelProvider();
var endEssent = DateTime.Now;
ifcModel = IfcStore.Open(path);
Debug.WriteLine($"TOTAL ELAPSED ESSENT: {endEssent-startEssent}");

Expected behavior:

the file to open as expected

Actual behavior or exception details:

Could not load file or assembly 'Esent.Interop, Version=1.9.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

martin1cerny commented 1 year ago

Are you on Windows? Esent is Windows specific.

emilaz commented 1 year ago

Yes I am

martin1cerny commented 1 year ago

Can you share the minimal but complete project setup to reproduce the issue please?