An error appears when running Z3 in C#

前端 未结 2 1857
执笔经年
执笔经年 2021-01-24 07:08

Can anyone please help! When I tried to run the code below, I got this error:

\" Could not load file or assembly \'Microsoft.Z3, Version=4.0.0.0, Cultur

2条回答
  •  闹比i
    闹比i (楼主)
    2021-01-24 07:34

    The easiest way is to use build.cmd script in examples/dotnet folder and modify it according to your need. The script copies Microsoft.Z3.dll and z3.dll to the working directory and compiles the code on the corresponding platform.

    If you compile from Visual Studio:

    • Make sure that Microsoft.Z3.dll's version you reference matches with the platform (x86, x64,...) which you're compiling to. There are two Z3 versions in bin and x64 folder.
    • Include the folder containing the Microsoft.Z3.dll in Project Properties->Reference Paths. The reason is that Microsoft.Z3.dll uses unmanaged z3.dll, which you cannot directly reference in Visual Studio.

提交回复
热议问题