This is the dotnet/dotnet VMR — a single repository containing all source code needed to build the .NET SDK. It mirrors sources from individual development repositories (runtime, sdk, aspnetcore, roslyn, etc.) into src/<repo>/ directories. Active development happens in those upstream repos; the VMR is a synchronized mirror used for unified product builds.
src/<repo>/— Mirrored source from each constituent repository (e.g.,src/runtime/,src/sdk/,src/aspnetcore/). Each has its own build system, solution files, and conventions.repo-projects/— MSBuild orchestration files (<repo>.proj) that drive each repo's build from the VMR. Each file declaresRepositoryReferenceitems to express inter-repo build dependencies.eng/— VMR-level build infrastructure, versioning, custom MSBuild tasks (eng/tools/tasks/), and CI pipeline definitions (eng/pipelines/).test/— VMR-level validation tests (not individual repo tests):Microsoft.DotNet.Tests— Shared testsMicrosoft.DotNet.SourceBuild.Tests— Source-build-specific validationMicrosoft.DotNet.Installer.Tests— Linux installer (deb/rpm) tests- Scenario tests are built/run from
repo-projects/scenario-tests.projusing thesrc/scenario-tests/repo
docs/— VMR design and operation documentation. Key docs:VMR-Design-And-Operation.md,VMR-Code-And-Build-Workflow.md,Codeflow-PRs.md.
src/source-mappings.json— Defines which repos are synced, remote URLs, and file inclusion/exclusion rules.src/source-manifest.json— Records the exact commit SHA of each repo synced into the VMR at any given point.
The build is driven entirely by MSBuild, not solution files:
build.cmd/build.shinvokes MSBuild onbuild.projbuild.proj(Microsoft.Build.Traversal SDK) buildsrepo-projects/dotnet.projdotnet.projdeclaresRepositoryReference Include="sdk"as the root dependency- Each
repo-projects/<repo>.projdeclares its ownRepositoryReferenceitems, forming a dependency graph repo-projects/Directory.Build.targetsresolves transitive dependencies and invokes each repo's build script (eng/common/build.shorbuild.cmd) with assembled arguments fromrepo-projects/Directory.Build.props.
- Microsoft-based build (default): Uses online NuGet feeds for pre-built dependencies. Works on Windows, Linux, and macOS.
- Source-build (
-sbflag): Builds everything from source with no pre-built binaries. Linux only. Requires./prep-source-build.shfirst. - Short stack: Only builds runtime and its dependencies (for mobile/WASM targets). Controlled by
ShortStackproperty ineng/RuntimeIdentifier.props. - Build passes: Some repos build in multiple passes. For example, runtime pass 2 builds cross-OS DACs on Windows x86; aspnetcore pass 2 builds hosting bundles. Controlled by
DotNetBuildPassinrepo-projects/dotnet.proj.
Repos are categorized in eng/VmrLayout.props as SharedRepositoryReference items (aspnetcore, runtime, winforms, wpf, efcore, etc.) or non-shared (sdk, msbuild, roslyn, fsharp, etc.). Shared components are only built when DotNetBuildSharedComponents=true (1xx feature band builds). Non-1xx builds consume pre-built shared components from prereqs/packages/shared-components/.
Full SDK build (Windows):
.\build.cmd -blFull SDK build (Unix):
./build.sh -blSource-build (Linux only):
./prep-source-build.sh
./build.sh -sb -blRun VMR-level tests:
.\build.cmd -test -bl./build.sh --test -bl- Built SDK archive:
artifacts/assets/Release/dotnet-sdk-<version>-<rid>.zip(or.tar.gz) - Shipping packages:
artifacts/packages/Release/Shipping/<repo>/ - Build logs:
artifacts/log/(per-repo logs inartifacts/log/<repo>/) - Binary logs:
artifacts/log/Build.binlog(when-blis used) - Intermediate objects:
artifacts/obj/ - Test results:
artifacts/TestResults/
- The VMR uses the Microsoft.DotNet.Arcade.Sdk for shared build infrastructure. Arcade provides the common
eng/common/scripts, signing, packaging, and CI patterns used across all .NET repos. Theeng/common/directory at the VMR root (and within eachsrc/<repo>/) is effectively read-only — it is sourced from arcade and overwritten during re-bootstrap or code flow. Do not modify these files directly; changes to shared build scripts must be made in the dotnet/arcade repository. - Default build configuration is
Release(set in rootDirectory.Build.props). Nullableis enabled globally for VMR-level projects.LangVersionis set tolatestfor VMR-level projects.- MSBuild XML files (
.proj,.props,.targets) use 2-space indentation. C# files use 4-space indentation. Shell scripts use 2-space indentation. - Shell scripts (
.sh) must use LF line endings. Batch files (.cmd) use CRLF. - Code style is governed by
.editorconfigfiles. The root.editorconfigsets basics (UTF-8, spaces, final newlines). Each repo undersrc/has its own.editorconfigwith more specific rules.
Each constituent repo may have its own AI assistant instructions (i.e. AGENTS.md, copilot-instructions.md file) with repo-specific build, test, and coding conventions. Always refer to these when working within a specific src/<repo>/ directory.