Please use GitHub discussions to see announcements, ask questions, make suggestions, and share information with other members of the source-build community.
This repo is the starting point for building .NET 6 from source. Instructions for building other .NET versions are provided near the end of this document.
The dependencies for building .NET from source can be found here. It may also be helpful to reference the Dockerfiles in dotnet-buildtools-prereqs-docker. We use these images to build and test source-build CI here.
.NET 6.0 and 7.0 are built from source using the dotnet/installer repo. Clone the dotnet/installer repo and check out the tag for the desired release. Then, follow the instructions in dotnet/installer's README to build .NET from source. Please see the support section below to see which feature branches are currently supported.
To build .NET Core 3.1 from source, pick a specific Git tag from this repo with your desired version, or use a release branch to build the latest servicing release of that version. Refer to the tag/branch's README for build instructions:
The source-build repository doesn't currently support Windows. See source-build#1190.
The key goal of source-build is to satisfy the official packaging rules of commonly used Linux distributions, such as Fedora and Debian. Many Linux distributions have similar rules. These rules tend to have two main principles: consistent reproducibility, and source code for everything.
A secondary goal of source-build is to allow .NET contributors to build a .NET SDK with coordinated changes in multiple repositories. However, the developer experience is significantly better in individual repositories and, if possible, contributors should make and test changes in the target repo, not source-build.
Source-build solves common challenges that most developers encounter when trying to build the whole .NET SDK from source.
- .NET is composed of many repositories that need to be built at a specific combination of commits.
- Each repository's build output needs to flow into the next repository's build.
- By default, most .NET repositories download prebuilt binary dependencies from online sources. These are forbidden by typical Linux distribution rules, and interfere with build output flow.
- Nearly all .NET repositories require the .NET SDK to build. This is a circular dependency, which presents a bootstrapping problem.
Starting with .NET 6, the core source-build infrastructure is integrated into the dotnet/installer repo. The main
branch on this repo now contains the tooling needed to build .NET's external dependencies from source.
Distro | Package Feed | Maintainer |
---|---|---|
Alpine | Community | @ayakael |
Arch Linux | Community Arch User Repo |
@alucryd |
CentOS Stream | CentOS Stream Mirror | @omajid |
Fedora | Default | @omajid, @crummel |
Homebrew | Formula | @asbjornu |
Red Hat Enterprise Linux | Default | @omajid |
Ubuntu | Default Personal Package Archives |
@mirespace |
.NET Source-Build is supported on the oldest available .NET SDK feature update for each major release, and on Linux only.
For example, if .NET 6.0.1xx
, 6.0.2xx
, 7.0.1xx
, and 7.0.2xx
feature updates are available from dotnet.microsoft.com, Source-Build will support 6.0.1xx
and 7.0.1xx
.
For the latest information about Source-Build support for new .NET versions, please check our GitHub Discussions page for announcements.
This repo is licensed under the MIT license.