Shared components for the NUKE build system.
For more information about these components, see the docs.
To read more about shared components in general, see the official NUKE docs.
To use the shared components in your build, install the NuGet package:
dotnet add package .\build\MyNukeBuild.csproj Hexagrams.Nuke.Components
ℹ In your build project, you'll want to keep or add an explicit package reference to
Nuke.Common
. This will ensure you keep the project organization provided by the NUKE MSBuild targets:dotnet add package .\build\MyNukeBuild.csproj Nuke.Common
See the samples for examples of how to use these components in your build projects.
This project uses the NUKE build tool (naturally). NUKE builds can be invoked in the following ways:
The preferred way to invoke NUKE builds is with the global tool. To install it, run the following command:
dotnet tool install nuke.globaltool -g
Verify your installation by listing the available targets with this command:
nuke --help
Build targets can now be run like so:
nuke compile
nuke test
nuke verify-format
# etc.
ℹ For added flavour, enable tab-completion for the global tool in your shell. See the official docs for instructions here.
NUKE generates PowerShell, cmd, and bash scripts that invoke builds and build
targets. To select a build target, specify it either as an argument or with the
--target
switch. For example:
./build.ps1 # Run the default build
./build.ps1 test # Run the 'test' target
./build.ps1 --target test # Run the 'test' target
NUKE builds are pure C# console apps. So, to run a build you can run the
_build
project from your IDE, just as you would any other executable.
NUKE also provides plugins to invoke builds from your preferred IDE: