dotnet / dotnet/sdk

dotnetup should support `--dry-run` for all commands that may modify the system

Open
#54,980 0 comments 0 reactions 0 assignees View on GitHub
Area-dotnetup untriaged
Dominant language
C#
Stars
3.2k
Forks
1.3k
PR merge metrics
PR metrics pending

Description

### Prerequisites

- [x] I have read the [dotnetup documentation](https://github.com/dotnet/sdk/tree/release/dnup/documentation/general/dotnetup).
- [x] I have searched for [existing dotnetup issues](https://github.com/dotnet/sdk/issues?q=is%3Aissue%20state%3Aopen%20label%3Adotnetup).
- [x] I have searched for [existing dotnetup discussions](https://github.com/dotnet/sdk/discussions/categories/dotnetup).

### Issue type

Bug report

### Description

It's common for tools of all kinds to support a 'what if'/'dry run' mode where the tool will do investigation/prep work for the command the user entered and then give a report of what _would_ happen if the user ran the command.

This can be used for things like update checks, or for building tooling on top of dotnetup.

At minimum,
* sdk install
* sdk update
* sdk uninstall
* runtime install
* runtime update
* runtime uninstall

should support this mode.

In this mode we'd do all of the non-modifying parts of these operations:
* manifest checking
* version resolution (channel -> latest in that channel)
* comparisons to locally installed components
* lists of locally-installed components to be removed/modified
and emit those, but not actually download/remove/install the components.\

(This was requested by @Redth)

### dotnetup version

latest

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at the dotnetup command entry points for SDK and runtime install, update, and uninstall, then trace manifest checks, version resolution, local comparisons, and system-modifying actions. Done means every listed command reports the planned operations without downloading, installing, removing, or otherwise modifying the system.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.