When I add the following lines to include CPLEX, I can't even run CBC which is very strange:
>tools\make run SOURCE=examples/dotnet/csintegerprogramming.cs
"C:\Program Files\dotnet\dotnet.EXE" build examples\\dotnet\\csintegerprogramming.csproj
Microsoft (R) Build Engine version 16.4.0+e901037fe for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.
Restore completed in 539.1 ms for C:\or-tools\examples\dotnet\csintegerprogramming.csproj.
csintegerprogramming -> C:\or-tools\examples\dotnet\bin\x64\Debug\netcoreapp2.1\Google.OrTools.csintegerprogramming.dll
Build succeeded.
0 Warning(s)
0 Error(s)
Time Elapsed 00:00:01.45
"C:\Program Files\dotnet\dotnet.EXE" run --no-build --project examples\\dotnet\\csintegerprogramming.csproj
---- Integer programming example with GLPK ----
Could not create solver GLPK_MIXED_INTEGER_PROGRAMMING
---- Linear programming example with CBC ----
Unhandled Exception: System.TypeInitializationException: The type initializer for 'Google.OrTools.LinearSolver.operations_research_linear_solverPINVOKE' threw an exception. ---> System.TypeInitializationException: The type initializer for 'SWIGExceptionHelper' threw an exception. ---> System.DllNotFoundException: Unable to load DLL 'google-ortools-native' or one of its dependencies: The specified module could not be found. (Exception from HRESULT: 0x8007007E)
at Google.OrTools.LinearSolver.operations_research_linear_solverPINVOKE.SWIGExceptionHelper.SWIGRegisterExceptionCallbacks_operations_research_linear_solver(ExceptionDelegate applicationDelegate, ExceptionDelegate arithmeticDelegate, ExceptionDelegate divideByZeroDelegate, ExceptionDelegate indexOutOfRangeDelegate, ExceptionDelegate invalidCastDelegate, ExceptionDelegate invalidOperationDelegate, ExceptionDelegate ioDelegate, ExceptionDelegate nullReferenceDelegate, ExceptionDelegate outOfMemoryDelegate, ExceptionDelegate overflowDelegate, ExceptionDelegate systemExceptionDelegate)
at Google.OrTools.LinearSolver.operations_research_linear_solverPINVOKE.SWIGExceptionHelper..cctor()
--- End of inner exception stack trace ---
at Google.OrTools.LinearSolver.operations_research_linear_solverPINVOKE.SWIGExceptionHelper..ctor()
at Google.OrTools.LinearSolver.operations_research_linear_solverPINVOKE..cctor()
--- End of inner exception stack trace ---
at Google.OrTools.LinearSolver.operations_research_linear_solverPINVOKE.new_Solver(String jarg1, Int32 jarg2)
at Google.OrTools.LinearSolver.Solver..ctor(String name, OptimizationProblemType problem_type)
at Google.OrTools.LinearSolver.Solver.CreateSolver(String name, String type)
at CsIntegerProgramming.RunIntegerProgrammingExample(String solverType) in C:\or-tools\examples\dotnet\csintegerprogramming.cs:line 21
at CsIntegerProgramming.Main() in C:\or-tools\examples\dotnet\csintegerprogramming.cs:line 111
tools\make: *** [run] Error -532462766
Any help is appreciated.
Thanks