Skip to content

Commit 07ae9a7

Browse files
committed
more docs
1 parent 514e5c7 commit 07ae9a7

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

documentation/project-docs/cli-guidelines.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ users have consistent experiences with all `dotnet` commands - even those that d
99
- [Verbosity](#verbosity)
1010
- [Framework selection](#framework-selection)
1111
- [RID selection](#rid-selection)
12+
- [Explicit RID](#explicit-rid)
13+
- [OS-specific RID](#os-specific-rid)
14+
- [Architecture-specific RID](#architecture-specific-rid)
15+
- [SDK-matching RID](#sdk-matching-rid)
1216
- [MSBuild Properties](#msbuild-properties)
1317
- [Output modes/formatting](#output-modesformatting)
1418
- [NuGet-related options](#nuget-related-options)
@@ -47,11 +51,48 @@ If you only support a subset of these values, map the missing ones to the closes
4751

4852
### Framework selection
4953

54+
Short form: `-f <TFM>`
55+
56+
Long form: `--framework <TFM>`
57+
5058
### RID selection
59+
60+
#### Explicit RID
61+
62+
Short form: `-r <RID>`
63+
64+
Long form: `--runtime <RID>`
65+
66+
#### OS-specific RID
67+
68+
Short form: `-o <OS>`
69+
70+
Long form: `--os <OS>`
71+
72+
#### Architecture-specific RID
73+
74+
Short form: `-a <ARCH>`
75+
76+
Long form: `--arch <ARCH>`
77+
78+
#### SDK-matching RID
79+
80+
Short form: `--ucr`
81+
82+
Long form: `--use-current-runtime`
83+
5184
### MSBuild Properties
85+
86+
Short form: `-p <MSBuild property expression(s)>`
87+
88+
Long form: `--property <MSBuild property expression(s)>`
89+
90+
If at all possible we _strongly encourage_ not parsing the `<MSBuild property expression(s)>` syntax yourself. It is much more complex than you think it is. At _best_ you should detect and forward along any of these arguments to any MSBuild invocations you make.
91+
5292
### Output modes/formatting
5393

5494
Long form: `--output`
95+
5596
Allowed values: `text`, `json`, others are relevant for your use case
5697

5798
Users value scriptability of CLI commands, and some form of structured output is key to supporting this. JSON is a common structured output format, but other formats may be more appropriate for your use case. If you use a structured format like `csv`, please for the love of Turing use a proper CSV writer and not just a hand-rolled comma-separated list of values so that you don't break [RFC 4180][4180].

0 commit comments

Comments
 (0)