DotNetCoreCLI@0 - .NET Core v0 task
Use this task to build, test, package, or publish a dotnet application, or to run a custom dotnet command. For package commands, this task supports NuGet.org and authenticated feeds like Package Management and MyGet.
If your .NET Core or .NET Standard build depends on NuGet packages, make sure to add two copies of this step: one with the restore
command and one with the build
command.
This task is deprecated; use DotNetCoreCLI@2.
Inputs
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 want 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
, the folder created by the publish command will be zipped and deleted.
Task control options
All tasks have control options in addition to their task inputs. For more information, see Control options and common task properties.
Output variables
None.
Remarks
Important
DotNetCorCLI@0
is deprecated. For a newer supported version, see DotNetCoreCLI@2.
Requirements
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 | 1.95.0 or greater |
Task category | Build |