This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

EngineAdapter FileNotFoundException problem

Im trying to run a simple hydraulic analysis from waterobjects.net by using the sample of PressureEngineRunner with example file Net1.inp which is provided with waterobjects.net .

I saw the form, select the appropriate file (which is provided in the sample directory) and press the button “Run”.

Everything looks OK but while initiating the EngineAdapter , an exception occurs that the details of it are shown below;

   

System.IO.FileNotFoundException: The specified module could not be found. (Exception from HRESULT: 0x8007007E)

at Haestad.Calculations.Pressure.NumericalEngine.EngineAdapter..ctor()

at WaterObjects.NET.PressureEngineRunner.PressureEngineRunnerForm.buttonRun_Click(Object sender, EventArgs e) in C:\Program Files (x86)\Bentley\WaterObjects.NET\WaterObjects.NET.PressureEngineRunner\Development\WaterObjects.NET.PressureEngineRunner\PressureEngineRunnerForm.cs:line 322

at System.Windows.Forms.Control.OnClick(EventArgs e)

at System.Windows.Forms.Button.OnClick(EventArgs e)

at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)

at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)

at System.Windows.Forms.Control.WndProc(Message& m)

at System.Windows.Forms.ButtonBase.WndProc(Message& m)

at System.Windows.Forms.Button.WndProc(Message& m)

at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)

at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)

at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

 

Could you please help me on the issue?

And could you please tell me the possible causes of corresponding exception.

Thanks in advance.

Versions:

MS Office: Office 365

WaterGEMS version : 10.01.01.04

WaterObjects.net version : 08.11.06.01

Visual Studio Community version : 2019

  • Hi Mehmet,

    There is actually an easy solution to this problem.

    The missing file is related to our licensing.  To fix this, simply follow these steps.

    1. Make note of the platform you are building in Visual Studio.  This will either be x86 and x64.  This is typically to the right of the configuration (Release or Debug).

    2. If you are building x86:

    Copy all files and folders from C:\Program Files (x86)\Bentley\WaterGEMS to the output folder (typically bin\x86\Debug or bin\x86\Release).  

    When prompted to overwrite, select "Skip these files"

    3. If you are building x64:

    Copy all files from C:\Program Files (x86)\Bentley\WaterGEMS\x64 to the output folder (typically bin\x64\Debug or bin\x64\Release).

    When prompted to overwrite, select "Skip these files".

    The missing file is related to our licensing.  It is specifically bentley.entliclib.dll but by following the above steps ensures you have any and all files that may not be referenced directly.

    If you have any more questions please feel free to ask.

    Kind Regards,

    Kris Culin
    Senior Software Developer
    Water Infrastructure
    Bentley Software
    Bentley Systems, Inc.

    Answer Verified By: Mehmet Ayan 

  • Hi Mehmet,

    We noticed that you mentioned your version number is 10.01.01.04. Kris' solution applies to newer versions (10.02.XX.XX+) where a newer licensing method is used. For 10.01.01.04 (which uses SELECTserver licensing), the file Bentley.liclib.10.dll would be copied, instead of bentley.entliclib.dll  See the following article from our Wiki:

    WaterObjects.NET error: Could not load file or assembly

    If you upgrade to 10.02.XX.XX, please see the following article for changes related to the new licensing:

    Licensing error with Waterobjects.NET project due to Licensing changes

    Additionally, the Waterobjects.NET SDK version you mentioned was built with examples for WaterGEMS V8i. For examples updated to CONNECT Edition, please download the CONNECT Edition (10.XX.XX.XX) release of the Waterobjects.NET SDK. See more here: WaterObjects.NET - Extending the capabilities of your OpenFlows product


    Regards,

    Jesse Dringoli
    Technical Support Manager, OpenFlows
    Bentley Communities Site Administrator
    Bentley Systems, Inc.

    Answer Verified By: Mehmet Ayan