Home

Awesome

.NET Source-Build

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 from source. It contains documentation, tools, and is used for issue tracking.

Prerequisites

Building .NET 8.0+

.NET 8.0 and newer will be built from the dotnet/dotnet repo. Clone the dotnet/dotnet repo and check out the tag for the desired release. Then, follow the instructions in dotnet/dotnet's README to build .NET from source.

Building .NET 6.0

.NET 6.0 is 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.

The source-build repository doesn't currently support Windows. See source-build#1190.

Source-build goals

There are two primary goals of the source-build effort:

  1. Increase .NET adoption by focusing on making .NET available everywhere

    If .NET was available everywhere - including Linux distributions and package managers like Homebrew - as a first class citizen, it would make .NET a more attractive option for developers who might otherwise look at other languages or runtimes. Users would be more likely to start using and keep using .NET if .NET is available on their development and release platforms of choice.

    To achieve this, we try to make it easier for community and partner maintainers to build and release .NET for their platforms. We need to make sure source-build satisfies 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 three main principles:

    • Limited or no network access
    • Consistent reproducibility
    • Source code for everything
  2. Make maintenance of the .NET product easier

    The current way of making changes to .NET during a servicing release is to make changes to individual product repositories and then adjust the dependency versions to flow the changes to the next set of repositories. This is repeated until all the repositories are updated. If there's an issue discovered late in the release cycle, the fixes and the dependency updates need to be re-done quickly, which becomes difficult. It's also difficult to verify that the issue is fixed in the final product. It would be much easier to make and test product-wide changes if we could make atomic changes to one repository and be able to build the whole product based on that source code at once.

    In addition, getting source-build fully functional would provide everyone with a place to try changes that would otherwise require a lot of coordination between multiple repositories - such as landing features that require changes to both the runtime and the SDK.

    For more details about this Unified Build, see this overview.

Source-build can help achieve both these goals by making it easier for everyone to build and release the entire .NET product end-to-end.

What does the source-build infrastructure do?

Source-build solves common challenges that most developers encounter when trying to build the whole .NET SDK from source.

Comprehensive Guidelines

.NET in Linux Distributions

DistroPackage FeedMaintainer
AlpineCommunity@ayakael
Arch LinuxCommunity<br>Arch User Repo@alucryd
CentOS StreamCentOS Stream Mirror@omajid
FedoraDefault@omajid
HomebrewFormula@asbjornu
Red Hat Enterprise LinuxDefault@omajid
UbuntuDefault<br>Personal Package Archives@mirespace

Support

.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, 8.0.1xx, and 8.0.2xx feature updates are available from dotnet.microsoft.com, Source-Build will support 6.0.1xx and 8.0.1xx.

For the latest information about Source-Build support for new .NET versions, please check our GitHub Discussions page for announcements.

License

This repo is licensed under the MIT license.