dotnet build
- 17 Feb 2022
- 1 Minute to read
- Print
- DarkLight
- PDF
dotnet build
- Updated on 17 Feb 2022
- 1 Minute to read
- Print
- DarkLight
- PDF
Article Summary
Share feedback
Thanks for sharing your feedback!
This is generated from the built in components of BuildMaster 7.0.0, and may be different than what you have installed (especially if you have extensions); go to [User Icon] -> Documentation within your BuildMaster instance to see exactly what operations are available.
dotnet build
Builds a .NET Core/Framework/Standard project using dotnet build.
Script usage:
DotNet::Build( Project: <text>, [Configuration: <text>], [PackageSource: <text>], [Framework: <text>], [Runtime: <text>], [Output: <text>], [ForceDependencyResolution: <true/false>], [Verbosity: <integer>], [AdditionalArguments: <text>], [DotNetPath: <text>] );
Arguments:
Name | Format | Script Usage | Usage Notes |
---|---|---|---|
☆ Project path (default) | text | Project | This must be the path to either a project file, solution file, or a directory containing a project or solution file. This argument is required. |
Configuration | text | Configuration | |
Package source | text | PackageSource | If specified, this NuGet package source will be used to restore packages when building. |
Framework | text | Framework | For building multiple target frameworks at once, leave this field blank and also leave "Output" blank. |
Runtime | text | Runtime | |
Output | text | Output | Specifies an output directory for the build. This is only valid if "Framework" is also specified. |
Force dependency resolution | true/false | ForceDependencyResolution | |
Verbosity | integer | Verbosity | |
Additional arguments | text | AdditionalArguments | |
dotnet path | text | DotNetPath | Full path of dotnet.exe (or dotnet on Linux). This is usually C:\Program Files\dotnet\dotnet.exe on Windows. If no value is supplied, the operation will default to %PROGRAMFILES%\dotnet\dotnet.exe for Windows and dotnet (from the path) on Linux. |
Note: This operation requires .NET Core build tools v2.0+ to be installed on the server.
See also:
Example:
# Build ~\src\MyProject.csproj with Release configuration, restoring NuGet packages from the InternalNuGet source DotNet::Build ~\src\MyProject.csproj ( Configuration: Release, PackageSource: InternalNuGet );
Was this article helpful?