Grapeyard.Labs.Nuke.Launchpad 0.1.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package Grapeyard.Labs.Nuke.Launchpad --version 0.1.1
NuGet\Install-Package Grapeyard.Labs.Nuke.Launchpad -Version 0.1.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Grapeyard.Labs.Nuke.Launchpad" Version="0.1.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Grapeyard.Labs.Nuke.Launchpad --version 0.1.1
#r "nuget: Grapeyard.Labs.Nuke.Launchpad, 0.1.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Grapeyard.Labs.Nuke.Launchpad as a Cake Addin
#addin nuget:?package=Grapeyard.Labs.Nuke.Launchpad&version=0.1.1

// Install Grapeyard.Labs.Nuke.Launchpad as a Cake Tool
#tool nuget:?package=Grapeyard.Labs.Nuke.Launchpad&version=0.1.1

NUKE Launchpad

Feature extensions and generic target definitions for the NUKE build system for C# and .NET.

Installation

After setting up a NUKE build project as described in the NUKE documentation, install NUKE Launchpad by adding package Grapeyard.Labs.Nuke.Launchpad to it as a NuGet dependency using a NuGet package manager or by adding it manually to its project file:

<ItemGroup>
  <PackageReference Include="Grapeyard.Labs.Nuke.Launchpad" Version="..." />
</ItemGroup>

This will automatically install all packages that are part of NUKE Launchpad and their mandatory transitive dependencies.

If the installation fails with NuGet error NU1202, upgrade the target framework of the NUKE build project to a compatible version first – net7.0 or above – using its project properties or manually via its project file:

<PropertyGroup>
  <TargetFramework>net7.0</TargetFramework>
</ItemGroup>

Usage

NUKE Launchpad contains configurable, reusable and rewritable build components that enable quick and easy realization of lightweight build procedures, by simply implementing the respective parameter and target interfaces:

using System;
using Grapeyard.Labs.Nuke.Launchpad.Parameters;
using Grapeyard.Labs.Nuke.Launchpad.Targets.Clean;
using Grapeyard.Labs.Nuke.Launchpad.Targets.Compile;
using Grapeyard.Labs.Nuke.Launchpad.Targets.Pack;
using Grapeyard.Labs.Nuke.Launchpad.Targets.Restore;
using Grapeyard.Labs.Nuke.Launchpad.Targets.Test;
using Nuke.Common;
using Nuke.Common.Git;

using static Grapeyard.Labs.Nuke.Launchpad.Common.BuildConfiguration;

/// <summary>
/// Entry point of the NUKE build project.
/// </summary>
public class Build
    : NukeBuild,
    IHasGitRepository,   // Parameter interface
    ICleanForDotNet,     // Target interfaces
    IRestoreWithDotNet,
    ICompileWithDotNet,
    IUnitTestWithDotNet,
    IPackWithDotNet
{
    /// <inheritdoc/>
    public string DefaultBuildConfiguration => Git.IsOnMainOrMasterBranch() ? Release : Debug;

    /// <summary>
    /// A representation of the local Git repository.
    /// </summary>
    /// <seealso cref="IHasGitRepository.GitRepository"/>
    private GitRepository Git => ((IHasGitRepository) this).GitRepository;

    /// <summary>
    /// Invokes the build execution and defines any number of default build targets.
    /// </summary>
    public static int Main()
    {
        return Execute<Build>(x => ((ITest) x).Test, x => ((IPack) x).Pack);
    }
}

Use the help command of NUKE afterwards to regenerate the build project and inspect all available build parameters and build targets:

nuke --help

The parameter and target interfaces of NUKE Launchpad are well documented and should be self-explanatory. Always check their documentation before implementing them to be aware of any quirks and configuration options.

Product Compatible and additional computed target framework versions.
.NET net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.3.0 102 3/14/2024
0.2.0 150 1/8/2024
0.1.1 97 9/8/2023
0.1.0 104 9/6/2023

• Added an additional layer of requirement checks within target interface ICleanForDotNet, which should make potential error messages due to nonexisting directories more clear.
• Added chapter Frequently Asked Questions to the repository documentation.
• Added a hint on how to fix error NU1202 during the installation of NuGet packages to the repository documentation and the project descriptions used for packaging.
• Revised the repository naming conventions and workflow procedures used for hotfixes.
• Modified internal regular expressions within class Constants to regard multiple consecutive white-spaces and additional separators like dashes and en dashes.
• Fixed errors that made build target Clean (via target interface ICleanForDotNet) try to delete the output directories of the build project for certain build output settings or the output directories of absent test projects.

Full changelog at https://gitlab.com/grapeyard-labs/libs/nuke-launchpad/-/blob/0.1.1/CHANGELOG.md