-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
Updates to the CLI commands reference #1129
Changes from 6 commits
240292c
07a6bdf
97d27b3
c69c0b9
a95de69
3c364aa
8c49a7d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,31 @@ | ||
--- | ||
title: dotnet-build | ||
description: dotnet-build | ||
keywords: .NET, .NET Core | ||
title: dotnet-build command | .NET Core SDK | ||
description: The dotnet-build command builds a project and all of its dependencies. | ||
keywords: dotnet-build, CLI, CLI command, .NET Core | ||
author: mairaw | ||
manager: wpickett | ||
ms.date: 06/20/2016 | ||
ms.date: 10/12/2016 | ||
ms.topic: article | ||
ms.prod: .net-core | ||
ms.technology: .net-core-technologies | ||
ms.devlang: dotnet | ||
ms.assetid: 70285a83-4103-4617-be8b-d0e1e9a4a91d | ||
--- | ||
|
||
dotnet-build | ||
=========== | ||
#dotnet-build | ||
|
||
## NAME | ||
## Name | ||
dotnet-build -- Builds a project and all of its dependencies | ||
|
||
## SYNOPSIS | ||
## Synopsis | ||
|
||
`dotnet build [--output] | ||
`dotnet build [--help] [--output] | ||
[--build-base-path] [--framework] | ||
[--configuration] [--runtime] [--version-suffix] | ||
[--build-profile] [--no-incremental] [--no-dependencies] | ||
[<project>]` | ||
[<project>]` | ||
|
||
## DESCRIPTION | ||
## Description | ||
|
||
The `dotnet build` command builds multiple source file from a source project and its dependencies into a binary. | ||
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 | |
} | ||
``` | ||
|
||
## OPTIONS | ||
## Options | ||
|
||
`-o`, `--output` [DIR] | ||
`-h|--help` | ||
|
||
Directory in which to place the built binaries. | ||
Prints out a short help for the command. | ||
|
||
`-b`, `--build-base-path` [DIR] | ||
`-o|--output <OUTPUT_DIRECTORY>` | ||
|
||
Directory in which to place the built binaries. You also need to define `--framework` when you specify this option. | ||
|
||
`-b|--build-base-path <OUTPUT_DIRECTORY>` | ||
|
||
Directory in which to place temporary outputs. | ||
|
||
`-f`, `--framework` [FRAMEWORK] | ||
`-f|--framework <FRAMEWORK>` | ||
|
||
Compiles for a specific framework. The framework needs to be defined in the project.json file. | ||
Compiles for a specific framework. The framework needs to be defined in the [project.json](project-json.md#frameworks) file. | ||
|
||
`-c`, `--configuration` [Debug|Release] | ||
`-c|--configuration [Debug|Release]` | ||
|
||
Defines a configuration under which to build. If omitted, it defaults to Debug. | ||
Defines a configuration under which to build. If omitted, it defaults to `Debug`. | ||
|
||
`-r`, `--runtime` [RUNTIME_IDENTIFIER] | ||
`-r|--runtime [RUNTIME_IDENTIFIER]` | ||
|
||
Target runtime to build for. | ||
Target runtime to build for. For a list of Runtime Identifiers (RIDs) you can use, see the [RID catalog](../rid-catalog.md). | ||
|
||
`--version-suffix` [VERSION_SUFFIX] | ||
`--version-suffix [VERSION_SUFFIX]` | ||
|
||
Defines what `*` should be replaced with in the version field in the project.json file. The format follows NuGet's version guidelines. | ||
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. | ||
|
||
`--build-profile` | ||
|
||
|
@@ -92,3 +95,17 @@ Marks the build as unsafe for incremental build. This turns off incremental comp | |
`--no-dependencies` | ||
|
||
Ignores project-to-project references and only builds the root project specified to build. | ||
|
||
## Examples | ||
|
||
Build a project and its dependencies: | ||
|
||
`dotnet build` | ||
|
||
Build a project and its dependencies using Release configuration: | ||
|
||
`dotnet build --configuration Release` | ||
|
||
Build a project and its dependencies for a specific runtime (in this excample, Ubuntu 16.04): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. typo "excample" There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good catch! Fixed, |
||
|
||
`dotnet build --runtime ubuntu.16.04-x64` |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,29 @@ | ||
--- | ||
title: dotnet-new | ||
description: dotnet-new | ||
keywords: .NET, .NET Core | ||
title: dotnet-new command | .NET Core | ||
description: The dotnet-new command creates new .NET Core projects in the current directory. | ||
keywords: dotnet-new, CLI, CLI command, .NET Core | ||
author: mairaw | ||
manager: wpickett | ||
ms.date: 06/20/2016 | ||
ms.date: 10/12/2016 | ||
ms.topic: article | ||
ms.prod: .net-core | ||
ms.technology: .net-core-technologies | ||
ms.devlang: dotnet | ||
ms.assetid: 263c3d05-3a47-46a6-8023-3ca16b488410 | ||
--- | ||
|
||
dotnet-new | ||
========== | ||
#dotnet-new | ||
|
||
## NAME | ||
dotnet-new -- Creates a new .NET Core project | ||
## Name | ||
dotnet-new -- Creates a new .NET Core project in the current directory | ||
|
||
## SYNOPSIS | ||
`dotnet new [--type] [--lang]` | ||
## Synopsis | ||
`dotnet new [--help] [--type] [--lang]` | ||
|
||
## DESCRIPTION | ||
## Description | ||
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. | ||
|
||
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: | ||
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: | ||
|
||
1. A `Program.cs` (or `Program.fs`) file that contains a sample "Hello World" program. | ||
2. A valid `project.json` file. | ||
|
@@ -33,28 +32,28 @@ After this, the project is ready to be compiled and/or edited further. | |
|
||
## Options | ||
|
||
`-l`, `--lang [C#|F#]` | ||
`-h|--help` | ||
|
||
Language of the project. Defaults to `C#`. `csharp` (`fsharp`) or `cs` (`fs`) are also valid options. | ||
Prints out a short help for the command. | ||
|
||
`-t`, `--type` | ||
`-l|--lang <C#|F#>` | ||
|
||
Type of the project. Valid values are `console`, `web`, `lib` and `xunittest`. | ||
Language of the project. Defaults to `C#`. Other valid values are `csharp`, `fsharp`, `cs` and `fs`. | ||
|
||
## EXAMPLES | ||
`-t|--type` | ||
|
||
`dotnet new` | ||
|
||
Drops a C# project in the current directory. | ||
Type of the project. Valid values for C# are `console`, `web`, `lib` and `xunittest` and for F# only `console` is valid. | ||
|
||
`dotnet new --lang f#` | ||
Drops an F# project in the current directory. | ||
## Examples | ||
|
||
Create a C# console application project in the current directory: | ||
|
||
`dotnet new --lang c#` | ||
|
||
Drops an C# project in the current directory. | ||
`dotnet new` or `dotnet new --lang c#` | ||
|
||
Create an F# console application project in the current directory: | ||
|
||
`dotnet new --lang f#` | ||
|
||
Create a new ASP.NET Core C# application project in the current directory: | ||
|
||
`dotnet new -t web` | ||
|
||
Drops a new ASP.NET Core project in the current directory. | ||
`dotnet new -t web` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should these descriptions be more explicit about the defaults? I.e. say that the first two examples create a console application and the the third example creates a C# application. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I like that. Fixed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would a link to "NuGet's version guidelines" be useful here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would, I just need to find it 😄
I'll check with the team if there is any.