Coder Social home page Coder Social logo

Comments (5)

matthewcrews avatar matthewcrews commented on July 16, 2024

I'll look into it this evening

from flips.

matthewcrews avatar matthewcrews commented on July 16, 2024

@smoothdeveloper There's a new version released (2.3.5) which has these changes. I've tested writing a net5.0 app and everything seems to work. Thanks for the PR!

from flips.

smoothdeveloper avatar smoothdeveloper commented on July 16, 2024

@matthewcrews thanks, it loads in FSI from Visual Studio now, the next issue is loading the native dependency, I'm not sure there is an easy built-in way for this:

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': 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.Solver_CreateSolver(String jarg1)
at Google.OrTools.LinearSolver.Solver.CreateSolver(String solver_id)
at Flips.ORTools.solve(OrToolsSolverType solverType, SolverSettings settings, Model model)
at FSI_0007.solve() in C:\work\flips.fsx:line 10
at <StartupCode$FSI_0008>.$FSI_0008.main@()

from flips.

smoothdeveloper avatar smoothdeveloper commented on July 16, 2024

Ok, here is a workaround for using in VS:

#r "nuget: NativeLibraryLoader"
open NativeLibraryLoader
new NativeLibrary(@"path\to\libz3.dll")
new NativeLibrary(@"path\to\google-ortools-native.dll")

from flips.

matthewcrews avatar matthewcrews commented on July 16, 2024

Huh, that's weird. That's seems like a regression on the Microsoft side. We had an issue with the native library loader in beta but they fixed it. Seems like it broke again.

from flips.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.