Skip to content

Commit c6ee3f5

Browse files
mairawBillWagner
authored andcommitted
Updates to the CLI commands reference (#1129)
* reviewed cli commands topics * removed byline * minor fixes * fixed broken links * addressed feedback * clarified language * fixed typo
1 parent a86c77c commit c6ee3f5

File tree

10 files changed

+341
-296
lines changed

10 files changed

+341
-296
lines changed

docs/core/tools/dotnet-build.md

Lines changed: 40 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,31 @@
11
---
2-
title: dotnet-build
3-
description: dotnet-build
4-
keywords: .NET, .NET Core
2+
title: dotnet-build command | .NET Core SDK
3+
description: The dotnet-build command builds a project and all of its dependencies.
4+
keywords: dotnet-build, CLI, CLI command, .NET Core
55
author: mairaw
66
manager: wpickett
7-
ms.date: 06/20/2016
7+
ms.date: 10/13/2016
88
ms.topic: article
99
ms.prod: .net-core
1010
ms.technology: .net-core-technologies
1111
ms.devlang: dotnet
1212
ms.assetid: 70285a83-4103-4617-be8b-d0e1e9a4a91d
1313
---
1414

15-
dotnet-build
16-
===========
15+
#dotnet-build
1716

18-
## NAME
17+
## Name
1918
dotnet-build -- Builds a project and all of its dependencies
2019

21-
## SYNOPSIS
20+
## Synopsis
2221

23-
`dotnet build [--output]
22+
`dotnet build [--help] [--output]
2423
[--build-base-path] [--framework]
2524
[--configuration] [--runtime] [--version-suffix]
2625
[--build-profile] [--no-incremental] [--no-dependencies]
27-
[<project>]`
26+
[<project>]`
2827

29-
## DESCRIPTION
28+
## Description
3029

3130
The `dotnet build` command builds multiple source file from a source project and its dependencies into a binary.
3231
By default, the resulting binary is in Intermediate Language (IL) and has a DLL extension.
@@ -55,31 +54,35 @@ In order to build an executable application instead of a library, you need a [sp
5554
}
5655
```
5756

58-
## OPTIONS
57+
## Options
5958

60-
`-o`, `--output` [DIR]
59+
`-h|--help`
6160

62-
Directory in which to place the built binaries.
61+
Prints out a short help for the command.
6362

64-
`-b`, `--build-base-path` [DIR]
63+
`-o|--output <OUTPUT_DIRECTORY>`
64+
65+
Directory in which to place the built binaries. You also need to define `--framework` when you specify this option.
66+
67+
`-b|--build-base-path <OUTPUT_DIRECTORY>`
6568

6669
Directory in which to place temporary outputs.
6770

68-
`-f`, `--framework` [FRAMEWORK]
71+
`-f|--framework <FRAMEWORK>`
6972

70-
Compiles for a specific framework. The framework needs to be defined in the project.json file.
73+
Compiles for a specific framework. The framework needs to be defined in the [project.json](project-json.md#frameworks) file.
7174

72-
`-c`, `--configuration` [Debug|Release]
75+
`-c|--configuration [Debug|Release]`
7376

74-
Defines a configuration under which to build. If omitted, it defaults to Debug.
77+
Defines a configuration under which to build. If omitted, it defaults to `Debug`.
7578

76-
`-r`, `--runtime` [RUNTIME_IDENTIFIER]
79+
`-r|--runtime [RUNTIME_IDENTIFIER]`
7780

78-
Target runtime to build for.
81+
Target runtime to build for. For a list of Runtime Identifiers (RIDs) you can use, see the [RID catalog](../rid-catalog.md).
7982

80-
`--version-suffix` [VERSION_SUFFIX]
83+
`--version-suffix [VERSION_SUFFIX]`
8184

82-
Defines what `*` should be replaced with in the version field in the project.json file. The format follows NuGet's version guidelines.
85+
Defines what `*` should be replaced with in the version field in the [project.json](project-json.md#version) file. The format follows NuGet's version guidelines.
8386

8487
`--build-profile`
8588

@@ -92,3 +95,17 @@ Marks the build as unsafe for incremental build. This turns off incremental comp
9295
`--no-dependencies`
9396

9497
Ignores project-to-project references and only builds the root project specified to build.
98+
99+
## Examples
100+
101+
Build a project and its dependencies:
102+
103+
`dotnet build`
104+
105+
Build a project and its dependencies using Release configuration:
106+
107+
`dotnet build --configuration Release`
108+
109+
Build a project and its dependencies for a specific runtime (in this example, Ubuntu 16.04):
110+
111+
`dotnet build --runtime ubuntu.16.04-x64`
Lines changed: 34 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,36 @@
11
---
2-
title: dotnet-install scripts reference
3-
description: dotnet-install scripts reference
4-
keywords: .NET, .NET Core
2+
title: dotnet-install scripts | .NET Core SDK
3+
description: Learn about the dotnet-install scripts to install the .NET Core CLI tools and the shared runtime.
4+
keywords: dotnet-install, dotnet-install scripts, .NET Core
55
author: mairaw
66
manager: wpickett
7-
ms.date: 06/20/2016
7+
ms.date: 10/12/2016
88
ms.topic: article
99
ms.prod: .net-core
1010
ms.technology: .net-core-technologies
1111
ms.devlang: dotnet
1212
ms.assetid: 59b9c456-2bfd-4adc-8202-a1c6a0a6c787
1313
---
1414

15-
dotnet-install scripts reference
16-
================================
15+
#dotnet-install scripts reference
1716

18-
## NAME
19-
dotnet-install.ps1 | dotnet-install.sh - script used to install the Command Line Interface (CLI) tools and shared runtime
17+
## Name
18+
dotnet-install.ps1 | dotnet-install.sh - script used to install the Command Line Interface (CLI) tools and the shared runtime
2019

21-
## SYNOPSIS
20+
## Synopsis
2221
Windows:
2322

2423
`dotnet-install.ps1 [-Channel] [-Version]
2524
[-InstallDir] [-Debug] [-NoPath]
2625
[-SharedRuntime]`
2726

28-
OS X/Linux:
27+
macOS/Linux:
2928

3029
`dotnet-install.sh [--channel] [--version]
3130
[--install-dir] [--debug] [--no-path]
3231
[--shared-runtime]`
3332

34-
## DESCRIPTION
33+
## Description
3534
The `dotnet-install` scripts are used to perform a non-admin install of the CLI toolchain and the shared runtime. You can download the scripts from our [CLI GitHub repo](https://github.com/dotnet/cli/tree/rel/1.0.0-preview2/scripts/obtain).
3635

3736
Their main use case is to help with automation scenarios and non-admin installations. There are two scripts, one for PowerShell that works on Windows and a bash script that works on Linux/OS X. They both have the same behavior. Bash script also "understands" PowerShell switches so you can use them across the board.
@@ -43,7 +42,7 @@ By default, the script will add the install location to the $PATH for the curren
4342

4443
Before running the script, please install all the required [dependencies](https://github.com/dotnet/core/blob/master/Documentation/prereqs.md).
4544

46-
You can install a specific version using the `--version` argument. The version needs to be specified as 3-part version (for example 1.0.0-13232). If omitted, it will default to the first global.json file found in the hierarchy above the folder where the script was invoked in that contains the `sdkVersion` property. If that is not present, it will use Latest.
45+
You can install a specific version using the `--version` argument. The version needs to be specified as 3-part version (for example, 1.0.0-13232). If omitted, it will default to the first [global.json](global-json.md) file found in the hierarchy above the folder where the script was invoked in that contains the `sdkVersion` property. If that is not present, it will use Latest.
4746

4847
You can also use this script to get the SDK or shared runtime debug binaries with debug symbols by using the `--debug` argument. If you do not do this on first install and realize you do need debug symbols later on, you can re-run the script with this argument and the version of the bits you installed.
4948

@@ -53,83 +52,75 @@ Options are different between script implementations.
5352
### PowerShell (Windows)
5453
`-Channel [CHANNEL]`
5554

56-
Which channel (for example, "future", "preview", "production") to install from. The default value is "Production".
55+
Which channel (for example, `future`, `preview`, `production`) to install from. The default value is `production`.
5756

5857
`-Version [VERSION]`
5958

60-
Which version of CLI to install; you need to specify the version as 3-part version (i.e. 1.0.0-13232). If omitted, it will default to the first global.json that contains the sdkVersion property; if that is not present, it will use Latest.
59+
Which version of CLI to install; you need to specify the version as 3-part version (for example, 1.0.0-13232). If omitted, it will default to the first [global.json](global-json.md) that contains the [sdkVersion](global-json.md#sdkversion) property; if that is not present, it will use Latest.
6160

6261
`-InstallDir [DIR]`
6362

64-
Path to install to. The directory is created if it doesn't exist. The default value is `%LocalAppData%\.dotnet`.
63+
Path to install to. The directory is created if it doesn't exist. The default value is *%LocalAppData%\.dotnet*.
6564

6665
`-Debug`
6766

68-
**true** to indicate that larger packages containing debugging symbols should be used; otherwise, **false**. The default value is **false**.
67+
`true` to indicate that larger packages containing debugging symbols should be used; otherwise, `false`. The default value is `false`.
6968

7069
`-NoPath`
7170

72-
**true** to indicate that the prefix/installdir are not exported to the path for the current session; otherwise, **false**.
73-
The default value is **false**, that is, the PATH is modified.
71+
`true` to indicate that the prefix/installdir are not exported to the path for the current session; otherwise, `false`.
72+
The default value is `false`, that is, the PATH is modified.
7473
This makes the CLI tools available immediately after install.
7574

7675
`-SharedRuntime`
7776

78-
**true** to install just the shared runtime bits; **false** to install the entire SDK. The default value is **false**.
77+
`true` to install just the shared runtime bits; `false` to install the entire SDK. The default value is `false`.
7978

80-
### Bash (OS X/Linux)
79+
### Bash (macOS/Linux)
8180
`--channel [CHANNEL]`
8281

8382
Which channel (for example "future", "preview", "production") to install from. The default value is "Production".
8483

8584
`--version [VERSION]`
8685

87-
Which version of CLI to install; you need to specify the version as 3-part version (i.e. 1.0.0-13232). If omitted, it will default to the first global.json that contains the sdkVersion property; if that is not present, it will use Latest.
86+
Which version of CLI to install; you need to specify the version as 3-part version (for example, 1.0.0-13232). If omitted, it will default to the first [global.json](global-json.md) that contains the [sdkVersion](global-json.md#sdkversion) property; if that is not present, it will use Latest.
8887

8988
`--install-dir [DIR]`
9089

9190
Path to where to install. The directory is created if it doesn't exist. The default value is `$HOME/.dotnet`.
9291

9392
`--debug`
9493

95-
**true** to indicate that larger packages containing debugging symbols should be used; otherwise, **false**. The default value is **false**.
94+
`true` to indicate that larger packages containing debugging symbols should be used; otherwise, `false`. The default value is `false`.
9695

9796
`--no-path`
9897

99-
**true** to indicate that the prefix/installdir are not exported to the path for the current session; otherwise, **false**.
100-
The default value is **false**, that is, the PATH is modified.
98+
`true` to indicate that the prefix/installdir are not exported to the path for the current session; otherwise, `false`.
99+
The default value is `false`, that is, the PATH is modified.
101100
This makes the CLI tools available immediately after install.
102101

103102
`--shared-runtime`
104103

105-
**true** to install just the shared runtime bits; **false** to install the entire SDK. The default value is **false**.
104+
`true` to install just the shared runtime bits; `false` to install the entire SDK. The default value is `false`.
106105

107-
## EXAMPLES
106+
## Examples
107+
108+
Install the dev latest version to the default location:
108109

109110
Windows:
110111

111-
```
112-
./dotnet-install.ps1 -Channel Future
113-
```
112+
`./dotnet-install.ps1 -Channel Future`
114113

115-
OS X/Linux:
114+
macOS/Linux:
116115

117-
```
118-
./dotnet-install.sh --channel Future
119-
```
116+
`./dotnet-install.sh --channel Future`
120117

121-
Installs the dev latest version to the default location.
118+
Install the latest preview to the specified location:
122119

123120
Windows:
124121

125-
```
126-
./dotnet-install.ps1 -Channel preview -InstallDir C:\cli
127-
```
128-
129-
OS X/Linux:
122+
`./dotnet-install.ps1 -Channel preview -InstallDir C:\cli`
130123

131-
```
132-
./dotnet-install.sh --channel preview --install-dir ~/cli
133-
```
124+
macOS/Linux:
134125

135-
Installs the latest preview to the specified location.
126+
`./dotnet-install.sh --channel preview --install-dir ~/cli`

docs/core/tools/dotnet-new.md

Lines changed: 28 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,29 @@
11
---
2-
title: dotnet-new
3-
description: dotnet-new
4-
keywords: .NET, .NET Core
2+
title: dotnet-new command | .NET Core
3+
description: The dotnet-new command creates new .NET Core projects in the current directory.
4+
keywords: dotnet-new, CLI, CLI command, .NET Core
55
author: mairaw
66
manager: wpickett
7-
ms.date: 06/20/2016
7+
ms.date: 10/12/2016
88
ms.topic: article
99
ms.prod: .net-core
1010
ms.technology: .net-core-technologies
1111
ms.devlang: dotnet
1212
ms.assetid: 263c3d05-3a47-46a6-8023-3ca16b488410
1313
---
1414

15-
dotnet-new
16-
==========
15+
#dotnet-new
1716

18-
## NAME
19-
dotnet-new -- Creates a new .NET Core project
17+
## Name
18+
dotnet-new -- Creates a new .NET Core project in the current directory
2019

21-
## SYNOPSIS
22-
`dotnet new [--type] [--lang]`
20+
## Synopsis
21+
`dotnet new [--help] [--type] [--lang]`
2322

24-
## DESCRIPTION
23+
## Description
2524
The `dotnet new` command provides a convenient way to initialize a valid .NET Core project and sample source code to try out the Command Line Interface (CLI) toolset.
2625

27-
This command is invoked in the context of a directory. When invoked, the command will result in two main artifacts being dropped to the directory:
26+
This command is invoked in the context of a directory. When invoked, the command will result in two main artifacts being dropped to the current directory:
2827

2928
1. A `Program.cs` (or `Program.fs`) file that contains a sample "Hello World" program.
3029
2. A valid `project.json` file.
@@ -33,28 +32,28 @@ After this, the project is ready to be compiled and/or edited further.
3332

3433
## Options
3534

36-
`-l`, `--lang [C#|F#]`
35+
`-h|--help`
3736

38-
Language of the project. Defaults to `C#`. `csharp` (`fsharp`) or `cs` (`fs`) are also valid options.
37+
Prints out a short help for the command.
3938

40-
`-t`, `--type`
39+
`-l|--lang <C#|F#>`
4140

42-
Type of the project. Valid values are `console`, `web`, `lib` and `xunittest`.
41+
Language of the project. Defaults to `C#`. Other valid values are `csharp`, `fsharp`, `cs` and `fs`.
4342

44-
## EXAMPLES
43+
`-t|--type`
4544

46-
`dotnet new`
47-
48-
Drops a C# project in the current directory.
45+
Type of the project. Valid values for C# are `console`, `web`, `lib` and `xunittest` and for F# only `console` is valid.
4946

50-
`dotnet new --lang f#`
51-
52-
Drops an F# project in the current directory.
47+
## Examples
48+
49+
Create a C# console application project in the current directory:
5350

54-
`dotnet new --lang c#`
55-
56-
Drops an C# project in the current directory.
51+
`dotnet new` or `dotnet new --lang c#`
52+
53+
Create an F# console application project in the current directory:
54+
55+
`dotnet new --lang f#`
56+
57+
Create a new ASP.NET Core C# application project in the current directory:
5758

58-
`dotnet new -t web`
59-
60-
Drops a new ASP.NET Core project in the current directory.
59+
`dotnet new -t web`

0 commit comments

Comments
 (0)