Files
ortools-clone/examples/dotnet/README.md

22 lines
1.3 KiB
Markdown
Raw Normal View History

2018-07-03 22:21:35 -07:00
# Dotnet Core examples
The following examples showcase how to use OrTools. The project solution has examples for both C# and F#.
We recommend that all projects you create target `netcoreapp2.0` as this allows you to compile for various frameworks and keep up-to-date with the latest frameworks.
Wherever you have ortools installed, be sure to reference the `Google.OrTools.dll` from the project file. You will also need to reference the library folder housing native libraries.
### Linux
To reference a particular folder on linux, you can either: explicitly set the **LD_LIBRARY_PATH**; or create a new configuration file with the path of the library folder in `/etc/ld.so.conf.d/` and then run `sudo ldconfig`. The former will set the path on a system level so that you don't have to use the environment.
### MacOS
2018-07-05 17:51:49 -07:00
To reference a particular folder on linux, you can explicitly set the **DYLD_LIBRARY_PATH**
2018-07-03 22:21:35 -07:00
2018-07-05 17:51:49 -07:00
## CSharp/FSharp project examples
2018-07-03 22:21:35 -07:00
2018-07-06 12:31:30 -07:00
By default all the examples are compiled in a console application with the startup object being the **Classname.Main** so that when compiled the entrypoint will be known.
2018-07-03 22:21:35 -07:00
2018-07-05 17:51:49 -07:00
## NetFx/FSharp compiler examples
2018-07-03 22:21:35 -07:00
2018-07-05 17:51:49 -07:00
Should you have another **netfx** you can compile individual file examples. Please see readme in the individual folders for the target language.