You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What version of OR-Tools and what language are you using?
Version: 9.10.4067
Language: C#
Which solver are you using (e.g. CP-SAT, Routing Solver, GLOP, BOP, Gurobi)
GLOP
What operating system (Linux, Windows, ...) and version?
Windows 11
What did you do?
Steps to reproduce the behavior:
Create a console .NetFramework project targeting 4.6.2 version
Install Google.Ortools via the Nuget package manager
Use the "Solver.CreateSolver("GLOP")" line to get the solver object.
Runtime exception is thrown:
System.TypeInitializationException: 'The type initializer for 'Google.OrTools.LinearSolver.operations_research_linear_solverPINVOKE' threw an exception Inner exception 1:
TypeInitializationException: The type initializer for 'SWIGExceptionHelper' threw an exception. Inner Exception 2:
DllNotFoundException: Unable to load DLL 'google-ortools-native': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
What did you expect to see
Able to the solver object
What did you see instead?
runtime exeception
Note:
Nuget pacakage manager shows that the ortools package has dependency with .net framework 4.6.2.
So, ideally it should work with .net 4.6.2 and above
The text was updated successfully, but these errors were encountered:
Thanks! @Mizux for the response!
Loading the dll 'google-ortools-native.dll' manually helped to resolve the exceptions in .net framework.
However, additionally the prefer-32 bit checkbox had to be unchecked for me to resolve the 'BadImageFormat' exception. (#1185)
Quick question:
Is there any other way than loading the dll manually to able to work with a .Net Framework application?
note: I cannot target .net core or .net 6.0 or above.
What version of OR-Tools and what language are you using?
Version: 9.10.4067
Language: C#
Which solver are you using (e.g. CP-SAT, Routing Solver, GLOP, BOP, Gurobi)
GLOP
What operating system (Linux, Windows, ...) and version?
Windows 11
What did you do?
Steps to reproduce the behavior:
"Solver.CreateSolver("GLOP")"
line to get the solver object.System.TypeInitializationException: 'The type initializer for 'Google.OrTools.LinearSolver.operations_research_linear_solverPINVOKE' threw an exception
Inner exception 1:
TypeInitializationException: The type initializer for 'SWIGExceptionHelper' threw an exception.
Inner Exception 2:
DllNotFoundException: Unable to load DLL 'google-ortools-native': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
What did you expect to see
Able to the solver object
What did you see instead?
runtime exeception
Note:
Nuget pacakage manager shows that the ortools package has dependency with .net framework 4.6.2.
So, ideally it should work with .net 4.6.2 and above
The text was updated successfully, but these errors were encountered: