dotnet / dotnet/sdk

dotnetup: Handle all unversioned files in dotnet root during installation (not just the muxer)

Open
#53,079 1 comment 0 reactions 1 assignee Claimed by @nagilson View on GitHub
Area-dotnetup untriaged
Dominant language
C#
Stars
3.2k
Forks
1.3k
PR merge metrics
PR metrics pending

Description

## Context

In [PR #52696](https://github.com/dotnet/sdk/pull/52696), `dotnetup` gained logic to safely handle the muxer (`dotnet`/`dotnet.exe`) during archive extraction — comparing runtime versions to decide whether to replace it and gracefully handling in-use scenarios.

However, the dotnet root contains other **unversioned files** beyond the muxer that are not currently handled by this logic. These include:

- The `dnx` script
- License files (e.g., `LICENSE.txt`, `ThirdPartyNotices.txt`)

## Proposal

Extend `MuxerHandler` (or introduce a broader handler) to manage **all unversioned files stored in the dotnet root** as a group. The rule should be:

- If we determine the muxer should be replaced (because a newer runtime was installed), replace **all** unversioned root files from the archive as well.
- If the muxer should **not** be replaced, skip all unversioned root files.
- Apply the same in-use / error handling strategy (warn or fail based on `--require-muxer-update`) to these files.

This keeps the dotnet root files consistent and avoids a situation where a new muxer is paired with stale license/script files or vice versa.

## References

- [PR #52696 review comment (dsplaisted)](https://github.com/dotnet/sdk/pull/52696) — _"I think we will want to handle not only the muxer but also any unversioned files stored in the dotnet root (which right now includes the `dnx` script and license files). I think what we want to do is handle all of those files as a group, ie if we replace the muxer then we replace the other files too."_

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.