Open joegoldman2 opened 11 months ago
totally agree - both the --arch
and --os
options should be unified across all commands that can take a --runtime
argument currently.
@joegoldman2 what version of the SDK did you discover this on?
I'm using the latest stable version 8.100.0
.
So I was looking into some additional testing for #37429 and realized something -- restore
allows multiple --runtime
options, so --arch
and --os
either have reduced utility (meaning they should either not be present here or only contribute part of the full set of runtimes). pack
is similar - it only surfaces --runtime
from the 'implicit restore' that can happen under the covers. We should make sure that adding --os
and --arch
works correctly when multiple --runtime
options are provided.
Summary
Currently, the
dotnet restore
command lacks an option to specify the target operating system directly, similar to the existing options indotnet build
anddotnet publish
. I propose the addition of a new argument:--os <OS>
.Motivation
The motivation behind this request is to align the
dotnet restore
command with the capabilities ofdotnet build
anddotnet publish
, which both support the--os
argument. Whiledotnet restore
already has the-r|--runtime
option to specify the target runtime identifier, having a dedicated--os
argument would provide consistency.Usage
Additional Information
N/A