Before you install .NET, run the following commands to add the Microsoft
package signing key to your list of trusted keys and add the package
repository.
Before you install .NET, run the following commands to add the Microsoft
package signing key to your list of trusted keys and add the package
repository.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-06-05 UTC."],[[["\u003cp\u003eThis guide provides instructions for getting started with OR-Tools in .Net on various Linux distributions, including Alpine, Centos, Debian, Fedora, OpenSuse, and Ubuntu.\u003c/p\u003e\n"],["\u003cp\u003eBefore starting, you need to have .Net Core SDK version 3.1 or higher installed, and instructions are provided for different Linux distributions.\u003c/p\u003e\n"],["\u003cp\u003eTo run the OR-Tools example, you need to download or clone the \u003ccode\u003edotnet_or-tools\u003c/code\u003e repository, build the project using \u003ccode\u003edotnet build -c Release\u003c/code\u003e, and then run the binary using \u003ccode\u003edotnet run -c Release\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThis guide focuses on providing a simple working example and directs you to further resources for a deeper dive into OR-Tools.\u003c/p\u003e\n"]]],["This guide outlines installing OR-Tools in .Net on various Linux distributions. Users must first install .Net Core SDK 3.1 or higher using distribution-specific commands (e.g., `apk add dotnet6-sdk` for Alpine, `sudo apt install -y dotnet-sdk-6.0` for Ubuntu). Next, download the `dotnet_or-tools` repository as a zip file or clone it with git. Subsequently, navigate to the `dotnet_or-tools` directory, build the project with `dotnet build -c Release`, and run it with `dotnet run -c Release`.\n"],null,["# Using OR-Tools NuGet for .Net\n\nIntroduction\n------------\n\nThis guide gets you started with OR-Tools in .Net with a simple working\nexample.\n\nAlthough these instructions might also work on other Linux variants, we\nhave only tested them on machines meeting the following requirements:\n\n\n- Alpine Edge 64-bit (x86_64)\n- Centos 7 LTS 64-bit (x86_64)\n- Debian SID 64-bit (x86_64)\n- Debian 11 (bullseye) 64-bit (x86_64)\n- Fedora 38 64-bit (x86_64)\n- Fedora 37 64-bit (x86_64)\n- OpenSuse Leap 64-bit (x86_64)\n- Ubuntu 24.10 64-bit (x86_64)\n- Ubuntu 22.04 LTS 64-bit (x86_64)\n- Ubuntu 20.04 LTS 64-bit (x86_64)\n\n\u003cbr /\u003e\n\nPrerequisites\n-------------\n\nThe following sections describe the prerequisites for installing OR-Tools.\n\n### .Net Core SDK \\\u003e= 3.1\n\nNext, install the .Net Core SDK version 3.1 or higher. To do so,\nopen a terminal window and enter: \n\n### Alpine\n\n apk add dotnet6-sdk\n ref: https://learn.microsoft.com/en-us/dotnet/core/install/linux-alpine\n\n### Centos\n\n sudo rpm -Uvh https://packages.microsoft.com/config/centos/7/packages-microsoft-prod.rpm\n sudo yum install -y dotnet-sdk-6.0\n\nref: https://learn.microsoft.com/en-us/dotnet/core/install/linux-centos#centos-7\n\n### Debian\n\nBefore you install .NET, run the following commands to add the Microsoft\npackage signing key to your list of trusted keys and add the package\nrepository. \n\n wget https://packages.microsoft.com/config/debian/11/packages-microsoft-prod.deb -O packages-microsoft-prod.deb\n dpkg -i packages-microsoft-prod.deb\n rm packages-microsoft-prod.deb\n\n sudo apt update\n sudo apt install -y dotnet-sdk-6.0\n\nref: https://learn.microsoft.com/en-us/dotnet/core/install/linux-debian\n\n### Fedora\n\n sudo dnf install -y dotnet-sdk-6.0\n\nref: https://learn.microsoft.com/en-us/dotnet/core/install/linux-fedora\n\n### Fedora\n\n sudo dnf install -y dotnet-sdk-6.0\n\nref: https://learn.microsoft.com/en-us/dotnet/core/install/linux-fedora\n\n### OpenSUSE\n\nBefore you install .NET, run the following commands to add the Microsoft\npackage signing key to your list of trusted keys and add the package\nrepository. \n\n sudo zypper install libicu\n sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc\n wget https://packages.microsoft.com/config/opensuse/15/prod.repo\n sudo mv prod.repo /etc/zypp/repos.d/microsoft-prod.repo\n sudo chown root:root /etc/zypp/repos.d/microsoft-prod.repo\n\nThen you can install the .Net SDK using the following command: \n\n sudo zypper install -y dotnet-sdk-6.0\n\nref: https://learn.microsoft.com/en-us/dotnet/core/install/linux-opensuse\n\n### Ubuntu\n\n sudo apt install -y dotnet-sdk-6.0\n\nref: https://learn.microsoft.com/en-us/dotnet/core/install/linux-ubuntu\n\n### Ubuntu\n\n sudo apt install -y dotnet-sdk-6.0\n\nref: https://learn.microsoft.com/en-us/dotnet/core/install/linux-ubuntu\n\n### Ubuntu\n\n sudo apt install -y dotnet-sdk-6.0\n\nref: https://learn.microsoft.com/en-us/dotnet/core/install/linux-ubuntu\n\nGet the .Net example code\n-------------------------\n\nThe example code is located in the\n[dotnet_or-tools](https://github.com/or-tools/dotnet_or-tools) repository.\n\n1. [Download the repository as a zip file](https://github.com/or-tools/dotnet_or-tools/archive/v9.12.zip)\n and extract it, or clone the repository:\n\n git clone -b v9.12 --depth 1 https://github.com/or-tools/dotnet_or-tools\n\n2. Change to the examples directory:\n\n cd dotnet_or-tools\n\nBuild the example\n-----------------\n\nFrom the `dotnet_or-tools` directory:\n\nBuild the project using:\n\n\n dotnet build -c Release\n\n\u003cbr /\u003e\n\nRun the example\n---------------\n\nFrom the `dotnet_or-tools` directory:\n\nRun the binary using:\n\n\n dotnet run -c Release\n\n\u003cbr /\u003e\n\nCongratulations! You've just run an application with OR-Tools, you are ready to\n[get started with OR-Tools](../../introduction/dotnet)."]]