Hello,
I have one test solution, pretty simple, that is 64-bit, actually targeting Any CPU, and OR works well.
However, in a broader scope, more robust application, I have a "problem solver" adapter to "hide the solver" from the rest of the way. Compilation works to a point, but still the OR DLL reference propagates more than I'd like. Well enough up to now.
When I run the test cases for this, I get BadImageFormatException loading the DLL. The DLL itself is there; gets pulled along with a 'Constraints' assembly providing the adapter.
Worst case I suppose I integrate the OR project from source instead of binaries, but I'd like to avoid that on account of additional dependencies, i.e. SWIG, etc.
Exception details below:
System.BadImageFormatException occurred
HResult=-
2147024885 Message=Could not load file or assembly 'Google.OrTools, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format.
Source=
FileName=Google.OrTools, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
FusionLog==== Pre-bind state information ===
LOG: DisplayName = Google.OrTools, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
(Fully-specified)
LOG: Appbase = /bin/Debug/
LOG: Initial PrivatePath = NULL
Calling assembly : , Version=1.0.0.0, Culture=neutral, PublicKeyToken=null.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: \bin\Debug\Football.Migrator.vshost.exe.config
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Attempting download of new URL /bin/Debug/Google.OrTools.DLL.
ERR: Failed to complete setup of assembly (hr = 0x8007000b). Probing terminated.
StackTrace:
at Engine.Providers.DraftProvider.Populate(TeamCollection collection, Draft draft)
at Migrator.Program.<>c__DisplayClass23.<Main>b__20(IUnitOfWork w, IRepository r) in \Program.cs:line 188
InnerException:
Best regards,
Michael Powell