netcoreapp2.0 - System.AccessViolationException using native dll
Sorry if this is not the right place for this issue.
Steps to reproduce
Create a new netcoreapp2.0 project
- Add reference to Google.OrTools
- Set target platform to x64
- Use the following Main function:
static void Main(string[] args) {
var solver = new Solver("Test");
}
- Run
Expected behavior
The solver should be instanciated and the program should terminate without exception.
Actual behavior
The solver instanciation throws an exception:
System.AccessViolationException : 'Attempted to read or write protected memory. This is often an indication that other memory is corrupt.'
Environment data
dotnet --info output:
Outils en ligne de commande .NET (2.0.0)
Product Information:
Version: 2.0.0
Commit SHA-1 hash: cdcd1928c9
Runtime Environment:
OS Name: Windows
OS Version: 10.0.15063
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\2.0.0\
Microsoft .NET Core Shared Framework Host
Version : 2.0.0
Build : e8b8861ac7faf042c87a5c2f9f2d04c98b69f28d
Notes
The library currently works on the net46 framework. An issue is also opened on the google side: https://github.com/google/or-tools/issues/463
I am closing the issue here as it does not seem like something that the CLI is actually doing wrong. If there is something that needs to chance in the CLI, please re-activate.