Installing OR-Tools for .Net from Binary on Windows


This guide explains how to install OR-Tools for .Net on Windows.

Although these instructions might also work on other Windows variants, we have only tested them on machines meeting the following requirements:

  • Windows 10 64-bit (x86_64) with
  • Microsoft Visual Studio 2022 or Visual Studio Community 2022
  • Microsoft Visual Studio 2019 or Visual Studio Community 2019

Microsoft Visual C++ Redistributable

You must have the Microsoft Visual C++ Redistributable for Visual Studio 2019 (select the x64 version) installed on your computer, since OR-Tools library for .Net is a wrapper for the C++ native library.

.NET Core 2.1 SDK

You must install the package .NET Core 2.1 SDK version 2.1.302 or higher from the following location: dotnet-sdk-2.1.402-windows-x64-installer

Installing OR-Tools

Take the following steps to install the OR-Tools library for .Net:

Download and extract the binary distribution for your system:

FlatZinc binary distributions

FlatZinc is a solver input language understood by a wide range of solvers.
OR-Tools also provides binary distributions with FlatZinc support:

Validate your installation

To test your .Net installations, open a x64 Native Tools Command Prompt and navigate to the directory where you unpacked the binary distribution. Then enter the following command:

tools\make test_dotnet

This runs a selection of examples for OR-Tools. If all the examples run successfully, you are ready to get started with OR-Tools.