dotnetup should support json outputs for all commands
- 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
Feature request
### Description
`dotnetup` should support json output for all commands, so that tooling like [MAUI.Sherpa](https://github.com/Redth/MAUI.Sherpa) can more easily integrate with it. When combined with [`--dry-run`](https://github.com/dotnet/sdk/issues/54980) this would let tools more easily show users what will happen when they perform a command.
We should align with the SDK here, so `--format json` is probably the most compatible here (and `--format text` would be the natural 'default').
The structure of the documents emitted for each command would be unique to each command, but it would be important that if the command was run with `--dry-run` that fact is communicated in the json (`"dry-run": true`) so that consumers have enough context to understand if the action was taken or not.
### dotnetup version
_No response_
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the dotnetup documentation and compare the SDK's existing --format json and --format text behavior. Inventory every dotnetup command and define each command's JSON structure, including a "dry-run": true field when --dry-run is used; done means all commands support both formats consistently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100