-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Install Local Runtimes with dotnetup .md
#52409
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
nagilson
merged 10 commits into
dotnet:release/dnup
from
nagilson:nagilson-install-runtimes
Feb 4, 2026
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
20d5059
Install Local Runtimes with `dotnetup`.md
nagilson 9474489
consistent nounage
nagilson d740fac
match documentation wording
nagilson 18a5749
Be more specific about specific component mgmt
nagilson 140ba23
Merge branch 'release/dnup' into nagilson-install-runtimes
nagilson 0aa3391
Feedback from Design Meeting
nagilson f6cb196
Merge with runtime implementation PR
nagilson e431e64
Add comment about global json scoped dotnet_root
nagilson e33a508
Merge branch 'release/dnup' into nagilson-install-runtimes
nagilson e1ffbff
Update command interface based on meeting
nagilson File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,124 @@ | ||
| # Installation of user runtimes | ||
|
|
||
| Installation of .NET Runtime archives is quite similar to that of .NET SDK installation. | ||
|
|
||
| It differs in a few ways, which we explore below. | ||
|
|
||
| ## Command Syntax | ||
|
|
||
| The runtime install command follows this syntax: | ||
|
|
||
| ```bash | ||
| dotnetup runtime install <version_or_channel>... | ||
| ``` | ||
|
|
||
| ### Basic Version Install | ||
|
|
||
| When only a version is provided, only the core .NET runtime (`Microsoft.NETCore.App`) is installed: | ||
| This runtime has the largest adoption / user base and there's a less distinguishable 'token' identifier. | ||
|
|
||
| ```bash | ||
| dotnetup runtime install 10.0.1 # Installs only .NET runtime 10.0.1 | ||
| ``` | ||
|
|
||
| ```bash | ||
| dotnetup runtime install # Installs latest .NET Core Runtime (or whatever is specified in global.json) | ||
| ``` | ||
|
|
||
| ### Component-Specific Install with `@` Syntax | ||
|
|
||
| To install specific runtime components, use the `<component>@<version>` syntax: | ||
|
|
||
| ```bash | ||
| dotnetup runtime install windowsdesktop@10.0.1 # Installs Windows Desktop runtime 10.0.1 (includes core runtime) | ||
| dotnetup runtime install aspnetcore@9.0.10 # Installs ASP.NET Core runtime 9.0.10 (includes core runtime) | ||
| dotnetup runtime install runtime@10.0.1 # Explicitly installs core runtime 10.0.1 | ||
| ``` | ||
|
|
||
| ### Component Types | ||
|
|
||
| | Token | Component | Description | | ||
| |-------|-----------|-------------| | ||
| | `runtime` | Microsoft.NETCore.App | The core .NET runtime | | ||
| | `aspnetcore` | Microsoft.AspNetCore.App | ASP.NET Core runtime (includes core runtime) | | ||
| | `windowsdesktop` | Microsoft.WindowsDesktop.App | Windows Desktop runtime for WPF/WinForms (includes core runtime) | | ||
|
|
||
| ### Multiple Components (Future) | ||
|
|
||
| We plan to support installing multiple components in a single command: | ||
|
|
||
| ```bash | ||
| # Future support - not yet implemented | ||
| dotnetup runtime install windowsdesktop@10.0.1 aspnetcore@9.0.10 | ||
| ``` | ||
|
|
||
| This will install both specified components sequentially. For now, run separate install commands. | ||
|
|
||
| ### Global.json Integration (Future) | ||
|
|
||
| We plan to support reading runtime requirements from `global.json`: | ||
|
|
||
| ```bash | ||
| dotnetup runtime install # Reads global.json and installs demanded runtime components | ||
| ``` | ||
|
|
||
| The `global.json` format for runtime specification is TBD, but will allow users to declaratively specify runtime dependencies for a repository. | ||
|
|
||
| ## `global.json` handling | ||
|
|
||
| The `sdk` paths feature in [`global.json`](https://learn.microsoft.com/en-us/dotnet/core/tools/global-json) is, in theory, not meant to inform runtime installation. | ||
|
|
||
| Essentially, we could remove `global.json` lookup from the chain of consideration when looking up where to install dotnet. However, we suggest that installing the SDK implies the user wants debugging and other features to work based on that .NET SDK. So, we will utilize the same logic and have `global.jsons` `sdk` feature also direct the location and install lookup of the .NET runtime for `dotnetup`, to at least the extent we control. The muxer itself does not respect this, but it does respect `DOTNET_ROOT`, which we can manipulate; admittedly, this may only be realistic for `dotnetup dotnet` or commands where we control the starting process, and we shouldn't set the entire user environment block to point to a repo specific location. | ||
|
|
||
| ## Versions | ||
|
|
||
| Runtime versions don't have a feature band. The version parsing handled by the [`Microsoft.Deployment.DotNet.Releases`](https://github.com/dotnet/deployment-tools/tree/main/src/Microsoft.Deployment.DotNet.Releases) library (see [`ChannelVersionResolver`](../../../src/Installer/Microsoft.Dotnet.Installation/Internal/ChannelVersionResolver.cs)), however, should account for this. Minimal changes are expected. | ||
|
|
||
| ## Muxer Handling | ||
|
|
||
| The .NET Runtime archives also include `dotnet.exe`. The host replacement logic will be the same as for the .NET SDK archives. However, we can assert that the muxer version is the same as the version of the runtime to be installed, which may reduce overhead. | ||
|
|
||
| ## Runtime Component Selection | ||
|
|
||
| There are 3 runtime archives produced: the runtime, aspnetcore runtime, and windows desktop runtime (see [`InstallComponent`](../../../src/Installer/Microsoft.Dotnet.Installation/InstallComponent.cs)). | ||
|
|
||
| The component is specified using the `<component>@<version>` syntax described above: | ||
|
|
||
| | Command | Effect | | ||
| |---------|--------| | ||
| | `dotnetup runtime install 10.0.1` | Installs only the core .NET runtime 10.0.1 | | ||
| | `dotnetup runtime install runtime@10.0.1` | Explicitly installs the core .NET runtime 10.0.1 | | ||
| | `dotnetup runtime install aspnetcore@10.0.1` | Installs ASP.NET Core runtime 10.0.1 (includes core runtime) | | ||
| | `dotnetup runtime install windowsdesktop@10.0.1` | Installs Windows Desktop runtime 10.0.1 (does NOT include core runtime) | | ||
|
|
||
| **Note:** The `--type` flag is **not** supported. Use the `<component>@<version>` syntax instead. | ||
|
|
||
| ### Future: Multiple Components | ||
|
|
||
| Support for installing multiple components in one command is planned but not yet implemented: | ||
|
|
||
| ```bash | ||
| # Planned - not yet supported | ||
| dotnetup runtime install windowsdesktop@10.0.1 aspnetcore@9.0.10 | ||
| ``` | ||
|
|
||
| ## Shared Resources | ||
|
|
||
| The .NET SDK install may include the .NET Runtime. | ||
|
|
||
| > **Note:** Detailed manifest tracking rules and uninstall strategy will be documented separately in the manifest design document. The rules below are preliminary and subject to change. | ||
|
|
||
| ### General Principles | ||
|
|
||
| 1. When installing `aspnetcore` runtime, the core runtime is also installed automatically (as the archives include it) | ||
| 2. Explicit user actions (install commands) are tracked in the manifest | ||
| 3. Uninstall operations should not break other installed components | ||
|
|
||
| What we will do is check `shared/{runtime-type}/{runtime-version}` and `host/fxr/{runtime-version}` in the hive location. We could also query the muxer itself (via [`HostFxrWrapper`](../../../src/Installer/Microsoft.Dotnet.Installation/Internal/HostFxrWrapper.cs)) for a more concrete answer as to if the install exists on disk. | ||
|
|
||
| Consider performance (folder check vs muxer invocation) vs accuracy (folder faking via rename) in this decision. | ||
|
|
||
| ## Optional Defaults | ||
|
|
||
| The [.NET Install Script](https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-install-script) installs the .NET Runtime when you install the ASP.NET Core Runtime. | ||
nagilson marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| We will do so as well, under the assumption there isn't a use case for a standalone aspnetcore or windowsdesktop runtime without the core runtime. | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.