Skip to content

Guide · Open source

How to use dotnet/runtime: clone, read and build the .NET source

Updated · written with AI from the project's own documentation and checked against our catalogue data

dotnet/runtime is the GitHub repository that holds the source code for the .NET runtime, its class libraries and the shared host (the dotnet command) that starts .NET apps. This guide is for developers and engineers who want to read that source, investigate how runtime behavior works, or contribute. By the end you will know how to clone the repo, where the key guides live, and when a simpler option is better.

.NETdotnet/runtime · ★ 18.4k · MIT

Quick start

  1. 1Decide if you need the source. Only clone this repo if you want to read or change the runtime and libraries. To build apps, install an official .NET release instead.
  2. 2Clone the repository. Run git clone https://github.com/dotnet/runtime in the folder where you want the code.
  3. 3Open the workflow guide. Read docs/workflow/README.md in the clone for the build and test instructions.
  4. 4Browse the source online. Use source.dot.net or apisof.net to look up APIs quickly without building anything.
  5. 5Test nightly builds if needed. Follow docs/project/dogfooding.md to get nightly builds of the runtime and libraries for your own projects.
  6. 6Contribute or report. Read CONTRIBUTING.md before opening a change, and report security issues privately via MSRC.

What dotnet/runtime contains

The README describes .NET as a cross-platform runtime for cloud, mobile, desktop, and IoT apps. This repository contains the code to build the .NET runtime, libraries and shared host (dotnet) installers for all supported platforms, plus the sources to the runtime and libraries.

Most people use .NET indirectly, by installing official .NET releases and building apps with them. Start with this repo only if you want to read or change the source itself.

  • Runtime and class library source code
  • The shared host, the dotnet command that starts .NET apps
  • Build and installer code for supported platforms

Clone the repository

The README's install method is to clone the repository with git. No prerequisites are listed in the README, but building the code requires the workflow steps described in the repo's docs/workflow/README.md file.

Cloning gives you a full local copy you can browse in your editor or search with your own tools.

git clone https://github.com/dotnet/runtime

Find your way around the source

The README links to online source indexes that are often faster than a local clone for quick lookups: the .NET source index, the .NET Framework source index, and the .NET API Catalog, which also covers APIs from daily builds and API usage info.

The README also links the API Reference docs, which are useful for checking the public contract of an API before reading its implementation.

  • source.dot.net: .NET source index
  • referencesource.microsoft.com: .NET Framework source index
  • apisof.net: .NET API Catalog including daily build APIs
  • learn.microsoft.com/dotnet/api: API Reference docs

Build and test from source

The repo's Workflow Instructions in docs/workflow/README.md explain how to build and test. Follow that file rather than guessing commands, since the README itself does not list build steps beyond cloning.

If you want to test unreleased changes in your own project, the Dogfooding guide at docs/project/dogfooding.md explains how to get nightly builds of the runtime and its libraries.

  • Build and test steps: docs/workflow/README.md
  • Nightly builds for testing in your own projects: docs/project/dogfooding.md

Contribute or report issues correctly

The Contributing guide, CONTRIBUTING.md, explains which kinds of contributions the project welcomes. Issues tied to the runtime, class libraries, frameworks, and the installation of the dotnet binary belong in this repo. Other issues should go to their sibling repos, and the README links to a new issue page to choose the right one.

Report security issues privately to the Microsoft Security Response Center through the MSRC Researcher Portal, not in a public issue. The README says you should receive a response within 24 hours. Details are in SECURITY.md.

  • Contributing guide: CONTRIBUTING.md
  • Issue chooser: github.com/dotnet/runtime/issues/new/choose
  • Security reports: MSRC Researcher Portal, details in SECURITY.md

Get a usable .NET install instead

If your goal is to build a .NET app, this repo is not the simplest path. The README points to official releases and docs for that, and to the learning resources on Microsoft Learn. Install an official release from the download page and follow the Get Started guide.

The latest release listed in this repo has no binaries attached, so do not come here for a download.

  • Official downloads: dotnet.microsoft.com/download
  • Get Started guide: learn.microsoft.com/dotnet/core/get-started

What people use it for

  • Reading how a class library API is implemented while debugging a .NET app
  • Investigating runtime behavior by following the shared host and runtime sources
  • Testing a nightly build of the runtime in your own project using the dogfooding guide
  • Browsing the .NET source on source.dot.net without building anything locally
  • Contributing a fix to the runtime or libraries following CONTRIBUTING.md

Frequently asked questions

How do I install dotnet/runtime?

The README's install method is to clone the repository with git clone https://github.com/dotnet/runtime. The README does not give a separate install step, and building from source is described in docs/workflow/README.md. If you only want to use .NET, install an official release instead.

What are the requirements for dotnet/runtime?

The README does not list prerequisites. Check docs/workflow/README.md for how to build and test before you start.

Is dotnet/runtime free to use?

Yes. The repository is licensed under the MIT license, as stated in the README and the LICENSE.TXT file.

Can I download a binary from this repo?

Not from this page. The README notes that the latest release is listed with no binaries attached, so install an official release from dotnet.microsoft.com/download.

Where do I learn to build .NET apps?

The README points to Microsoft Learn for that, including the Get Started guide at learn.microsoft.com/dotnet/core/get-started and the ASP.NET Core home. This repo is not a beginner tutorial.

How do I report a security bug in .NET?

Report it privately to the Microsoft Security Response Center through the MSRC Researcher Portal. The README says you should get a response within 24 hours, and SECURITY.md has more detail.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

Use dotnet/runtime if you want to read, debug or contribute to the .NET runtime and libraries, and you are comfortable working from source. If you only want to build apps or are looking for a beginner tutorial, install an official .NET release and use Microsoft's learning resources instead.

Install options & downloads