DotNetCoreCLI@1 - .NET Core v1 task
Build, test and publish using dotnet core command-line.
For a newer version of this task, see DotNetCoreCLI@2.
# .NET Core v1
# Build, test and publish using dotnet core command-line.
- task: DotNetCoreCLI@1
inputs:
command: 'build' # 'build' | 'publish' | 'restore' | 'test' | 'run'. Required. Command. Default: build.
#publishWebProjects: true # boolean. Optional. Use when command = publish. Publish Web Projects. Default: true.
#projects: # string. Optional. Use when command != publish || publishWebProjects = false. Project(s).
#arguments: # string. Arguments.
#zipAfterPublish: true # boolean. Optional. Use when command = publish. Zip Published Projects. Default: true.
command
- Command
string
. Required. Allowed values: build
, publish
, restore
, test
, run
. Default value: build
.
The dotnet command to run. Specify custom
to add arguments or use a command not listed here.
publishWebProjects
- Publish Web Projects
boolean
. Optional. Use when command = publish
. Default value: true
.
If this input is set to true
, the projects
property value is skipped, and the task tries to find the web projects in the repository and run the publish command on them. Web projects are identified by the presence of either a web.config
file or a wwwroot
folder in the directory. In the absence of a web.config
file or a wwwroot
folder, projects that use a web SDK, like Microsoft.NET.Sdk.Web
, are selected.
projects
- Project(s)
string
. Optional. Use when command != publish || publishWebProjects = false
.
The path to the .csproj
file(s) to use. You can use wildcards (e.g. **/*.csproj
for all .csproj
files in all subfolders). For more information, see the file matching patterns reference.
arguments
- Arguments
string
.
Specifies the arguments for the selected command. For example, build configuration, output folder, and runtime. The arguments depend on the command selected.
This input currently only accepts arguments for build
, publish
, run
, test
, and custom
. If you would like to add arguments for a command not listed, use custom
.
zipAfterPublish
- Zip Published Projects
boolean
. Optional. Use when command = publish
. Default value: true
.
If this input is set to true
, a folder created by the publish command will be zipped and deleted.
All tasks have control options in addition to their task inputs. For more information, see Control options and common task properties.
None.
For a newer version of this task, see DotNetCoreCLI@2.
Requirement | Description |
---|---|
Pipeline types | YAML, Classic build, Classic release |
Runs on | Agent |
Demands | None |
Capabilities | This task does not satisfy any demands for subsequent tasks in the job. |
Command restrictions | Any |
Settable variables | Any |
Agent version | 2.0.0 or greater |
Task category | Build |