Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dotnet build --help should be more helpful #11107

Open
BruceForstall opened this issue Apr 2, 2020 · 1 comment
Open

dotnet build --help should be more helpful #11107

BruceForstall opened this issue Apr 2, 2020 · 1 comment
Labels
Milestone

Comments

@BruceForstall
Copy link
Member

When I run dotnet build --help, I see:

Usage: dotnet build [options] <PROJECT | SOLUTION>

Arguments:
  <PROJECT | SOLUTION>   The project or solution file to operate on. If a file is not specified, the command will search the current directory for one.

Options:
  -h, --help                            Show command line help.
  -o, --output <OUTPUT_DIR>             The output directory to place built artifacts in.
  -f, --framework <FRAMEWORK>           The target framework to build for. The target framework must also be specified in the project file.
  -c, --configuration <CONFIGURATION>   The configuration to use for building the project. The default for most projects is 'Debug'.
  -r, --runtime <RUNTIME_IDENTIFIER>    The target runtime to build for.
  --version-suffix <VERSION_SUFFIX>     Set the value of the $(VersionSuffix) property to use when building the project.
  --no-incremental                      Do not use incremental building.
  --no-dependencies                     Do not build project-to-project references and only build the specified project.
  /nologo, --nologo                     Do not display the startup banner or the copyright message.
  --no-restore                          Do not restore the project before building.
  --interactive                         Allows the command to stop and wait for user input or action (for example to complete authentication).
  -v, --verbosity <LEVEL>               Set the MSBuild verbosity level. Allowed values are q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic].
  --force                               Force all dependencies to be resolved even if the last restore was successful.
                                        This is equivalent to deleting project.assets.json.

It could be more helpful in several ways:

  1. --framework: what can I use for <FRAMEWORK>? Give me the list. Give me an example. It says, "The target framework must also be specified in the project file." Tell me which project file you're looking at, and which frameworks are in there right now. Tell me the default.
  2. --runtime. What can I use for <RUNTIME_IDENTIFIER>? Give me some examples. Tell me where to find the entire list. Tell me what the default is. Link to the RID catalog documentation https://docs.microsoft.com/en-us/dotnet/core/rid-catalog?
  3. Include an URL to the documentation, either https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-build or more generally https://docs.microsoft.com/en-us/dotnet/core/tools/.

Nit: shouldn't the syntax on the first line be:

Usage: dotnet build [options] [<PROJECT | SOLUTION>]

with [ ] around PROJECT/SOLUTION to indicate it is optional to specify that?

@marcpopMSFT marcpopMSFT added the untriaged Request triage from a team member label Apr 6, 2020
@dsplaisted dsplaisted added Area-CLI needs team triage Requires a full team discussion labels Jan 31, 2021
@dsplaisted dsplaisted removed their assignment Jan 31, 2021
@marcpopMSFT marcpopMSFT added this to the Backlog milestone Feb 3, 2021
@marcpopMSFT marcpopMSFT removed needs team triage Requires a full team discussion untriaged Request triage from a team member labels Feb 3, 2021
@marcpopMSFT
Copy link
Member

This is improved in .NET 6 for --framework as we will include the options in the output. Keeping this issue active for RID and URL suggestions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants