When .NET is installed, it uses a specific directory structure where a single version-agnostic {dotnet_root} serves as a shared root for multiple major and minor versions. While the host is a single executable, most components (runtimes, SDKs, frameworks) reside in versioned subdirectories, allowing multiple versions to coexist side-by-side.
Key components include:
- {dotnet_root}: The shared root (e.g.,
dotnet). - dotnet: The native host (muxer) used to launch runtimes or SDKs.
- dnx: A shell script for one-shot execution of .NET tools (similar to
npx). - host/fxr/<version>: Contains framework resolution logic.
- sdk/<version>: The managed tooling (CLI, MSBuild, compilers, etc.).
- shared/: Contains versioned shared frameworks like
Microsoft.NETCore.App, Microsoft.AspNetCore.App, and Microsoft.WindowsDesktop.App (Windows only). - packs/: Contains reference assemblies (
.Ref) for compilation and runtime packs for building self-contained applications. - library-packs/: Contains NuGet package files used as a NuGet source by the SDK.
- templates/: Contains project templates used by
dotnet new.
{dotnet_root}
├── dotnet
├── dnx
├── LICENSE.txt
├── ThirdPartyNotices.txt
├── host
│ └── fxr
│ └── <fxr version>
├── sdk
│ └── <sdk version>
├── sdk-manifests
│ └── <sdk feature band version>
├── library-packs
├── metadata
│ └── workloads
│ └── <sdk feature band version>
├── template-packs
├── packs
│ ├── Microsoft.AspNetCore.App.Ref
│ ├── Microsoft.NETCore.App.Ref
│ ├── Microsoft.NETCore.App.Host.<rid>
│ ├── Microsoft.WindowsDesktop.App.Ref
│ ├── NETStandard.Library.Ref
│ ├── Microsoft.NETCore.App.Runtime.<rid>
│ ├── Microsoft.AspNetCore.App.Runtime.<rid>
│ ├── runtime.<rid>.Microsoft.DotNet.ILCompiler
│ └── Microsoft.NETCore.App.Runtime.NativeAOT.<rid>
├── shared
│ ├── Microsoft.NETCore.App
│ ├── Microsoft.AspNetCore.App
│ ├── Microsoft.AspNetCore.All
│ └── Microsoft.WindowsDesktop.App
└── templates
└── <templates version>