`dotnetup` should allow runtime installation required by a solution using `--solution`
- 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` supports installation of runtimes using explicit version numbers. This is fine for a small project that uses a few runtimes. For a large project, this quickly becomes tedious as one has to look at individual projects (in a solution) and make a list of all required runtimes to be able to get started.
I'm proposing that the `dotnetup runtime install` should have a solution-based installation strategy where it would look at individual `.csproj` files, collect all the `` requirements, and install them in one go. This makes `TargetFramework` the single source of truth for runtime versions and eliminates manual wiring in any top-level manifest (`global.json`) based approach. Change `TargetFramework` in a `.csproj` file and re-run the installation to immediately get the right version of runtime installed on your machine.
`dotnetup runtime install --solution Reactor.slnx` should install all runtimes required by that solution and track the installations under the specified `.slnx` file. It should try to minimize the number of required versions to be installed. `netstandard2.0`, for example, is supported by all latest versions of dotnet so, any compatible version already satisfies its requirement.
*I'm only entering into the .NET world now so this all may not make sense at all 😅 (Feel free to close it)*
### dotnetup version
Not required
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the `dotnetup runtime install --solution` command and the referenced `.slnx` and `.csproj` files. Check how `TargetFramework` requirements are collected and how installations are tracked under a solution. Done means the command installs compatible runtimes for all projects while minimizing redundant versions, and `dotnetup version` remains unchanged.
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