Bullseye 5.0.0-alpha.2

This is a prerelease version of Bullseye.
There is a newer version of this package available.
See the version list below for details.
dotnet add package Bullseye --version 5.0.0-alpha.2                
NuGet\Install-Package Bullseye -Version 5.0.0-alpha.2                
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="Bullseye" Version="5.0.0-alpha.2" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Bullseye --version 5.0.0-alpha.2                
#r "nuget: Bullseye, 5.0.0-alpha.2"                
#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 Bullseye as a Cake Addin
#addin nuget:?package=Bullseye&version=5.0.0-alpha.2&prerelease

// Install Bullseye as a Cake Tool
#tool nuget:?package=Bullseye&version=5.0.0-alpha.2&prerelease                

Bullseye

Bullseye

NuGet version

Build status CodeQL analysis Lint Spell check

AppVeyor smoke test status CircleCI smoke test status Cirrus CI smoke test status GitLab CI/CD smoke test status

Bullseye is a .NET library that runs a target dependency graph.

Bullseye is primarily designed as a build tool for .NET projects, and is usually used together with SimpleExec, but Bullseye targets can do anything. They are not restricted to building .NET projects.

Platform support: .NET 6.0 and later.

Quick start

  • Next to an existing .NET solution (.sln file), add a .NET console app named targetsdotnet new console --name targets

  • Change to the new directory — cd targets

  • Add a reference to Bullseyedotnet add package Bullseye

  • Add a reference to SimpleExecdotnet add package SimpleExec

  • Replace the contents of targets/Program.cs with:

    using static Bullseye.Targets;
    using static SimpleExec.Command;
    
    Target("build", () => RunAsync("dotnet", "build --configuration Release --nologo --verbosity quiet"));
    Target("test", DependsOn("build"), () => RunAsync("dotnet", "test --configuration Release --no-build --nologo --verbosity quiet"));
    Target("default", DependsOn("test"));
    
    await RunTargetsAndExitAsync(args, ex => ex is SimpleExec.ExitCodeException);
    
  • Change to the solution directory — cd ..

  • Run the targets project — dotnet run --project targets.

Voilà! You've just written and run your first Bullseye build program. You will see output similar to:

<img src="https://github.com/adamralph/bullseye/assets/677704/2f598c2f-89ab-43dc-929a-59f4504dfa28" width="1088px" />

For help, run dotnet run --project targets --help.

Sample wrapper scripts

  • build (Linux and macOS)

    #!/usr/bin/env bash
    set -euo pipefail
    dotnet run --project targets -- "$@"
    
  • build.cmd (Windows)

    @echo Off
    dotnet run --project targets -- %*
    

Enumerable inputs

For example, you may want to run your test projects one by one, so that the timing of each one and which one, if any, failed, is displayed in the Bullseye build summary:

Target(
    "test",
    DependsOn("build"),
    ForEach("./FooTests.Acceptance", "./FooTests.Performance"),
    project => RunAsync($"dotnet", $"test {project} --configuration Release --no-build --nologo --verbosity quiet"));
dotnet run -- test

<img src="https://github.com/adamralph/bullseye/assets/677704/c25901c6-f30b-4632-8b62-fa3a755729fc" width="1085px" />

Command-line arguments

Generally, all the command-line arguments passed to Program.cs should be passed along to Bullseye, as shown in the quick start above (RunTargetsAndExitAsync(args);). This is because Bullseye effectively provides a command-line interface, with options for displaying a list of targets, performing dry runs, suppressing colour, and more. For full details of the command-line options, run your targets project supplying the --help (-h/-?) option:

dotnet run --project targets -- --help
./build --help
./build.cmd --help

You can also handle custom arguments in Program.cs, but you should ensure that only valid arguments are passed along to Bullseye and that the help text contains both your custom arguments and the arguments supported by Bullseye. A good way to do this is to use a command-line parsing package to define your custom arguments, and to provide translation between the package and Bullseye. For example, see the test projects for:

Non-static API

For most cases, the static API described above is sufficient. For more complex scenarios where a number of target collections are required, the non-static API may be used.

var targets1 = new Targets();
targets1.Add("foo", () => Console.Out.WriteLine("foo1"));

var targets2 = new Targets();
targets2.Add("foo", () => Console.Out.WriteLine("foo2"));

await targets1.RunWithoutExitingAsync(args);
await targets2.RunWithoutExitingAsync(args);

NO_COLOR

Bullseye supports NO_COLOR.

Who's using Bullseye?

To name a few:

Feel free to send a pull request to add your repository or organisation to this list!


<sub>Target by Franck Juncker from the Noun Project.</sub>

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  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.
  • net6.0

    • No dependencies.
  • net7.0

    • No dependencies.

NuGet packages (7)

Showing the top 5 NuGet packages that depend on Bullseye:

Package Downloads
Apprio.Enablement.Infrastructure

Package Description

Faithlife.Build

A build automation system using C# build scripts.

Apprio.Azure.Infrastructure

Package Description

DevOpsTargets

A tools that are helping when deploying .NET and other applications.

Xenial.Beer

Beer - Delicious dotnet build tools

GitHub repositories (45)

Showing the top 5 popular GitHub repositories that depend on Bullseye:

Repository Stars
IdentityServer/IdentityServer4
OpenID Connect and OAuth 2.0 Framework for ASP.NET Core
xunit/xunit
xUnit.net is a free, open source, community-focused unit testing tool for .NET.
elastic/elasticsearch-net
This strongly-typed, client library enables working with Elasticsearch. It is the official client maintained and supported by Elastic.
aaubry/YamlDotNet
YamlDotNet is a .NET library for YAML
adamhathcock/sharpcompress
SharpCompress is a fully managed C# library to deal with many compression types and formats.
Version Downloads Last updated
5.0.0 130,606 1/15/2024
5.0.0-rc.1 588 12/21/2023
5.0.0-alpha.2 891 9/25/2023
5.0.0-alpha.1 993 6/9/2023
4.2.1 192,933 1/24/2023
4.2.1-rc.1 567 12/3/2022
4.2.0 61,663 11/9/2022
4.2.0-beta.1 385 10/30/2022
4.1.1 31,043 10/22/2022
4.1.0 1,013 10/16/2022
4.1.0-rc.1 227 10/9/2022
4.1.0-alpha.2 390 8/28/2022
4.1.0-alpha.1 4,060 3/13/2022
4.0.0 165,181 3/12/2022
4.0.0-rc.3 306 3/11/2022
4.0.0-rc.2 6,341 12/30/2021
4.0.0-rc.1 284 12/23/2021
4.0.0-beta.1 2,884 11/7/2021
4.0.0-alpha.2 258 11/6/2021
4.0.0-alpha.1 575 9/19/2021
3.8.0 889,979 8/20/2021
3.8.0-rc.1 454 8/3/2021
3.8.0-beta.1 242 7/28/2021
3.8.0-alpha.2 209 7/25/2021
3.8.0-alpha.1 218 7/25/2021
3.7.1 30,119 7/12/2021
3.7.0 594,280 1/20/2021
3.7.0-alpha.1 569 1/7/2021
3.6.0 40,362 1/1/2021
3.6.0-rc.1 1,278 12/22/2020
3.6.0-beta.1 313 12/4/2020
3.5.0 100,497 9/19/2020
3.5.0-rc.1 427 9/4/2020
3.4.0 49,722 7/26/2020
3.4.0-alpha.1 458 6/24/2020
3.3.0 243,424 4/2/2020
3.3.0-beta.1 415 3/6/2020
3.2.0 13,662 2/20/2020
3.2.0-rc.1 417 2/9/2020
3.2.0-alpha.2 599 12/26/2019
3.2.0-alpha.1 382 12/23/2019
3.1.0 76,567 12/7/2019
3.1.0-rc.1 963 11/13/2019
3.1.0-alpha.1 515 10/16/2019
3.0.0 65,929 10/13/2019
3.0.0-rc.1 4,335 9/8/2019
3.0.0-beta.3 873 8/27/2019
3.0.0-beta.2 261 8/25/2019
3.0.0-beta.1 276 8/25/2019
3.0.0-alpha.1 270 8/24/2019
2.4.0 6,764 7/27/2019
2.4.0-rc.2 15,968 7/15/2019
2.4.0-rc.1 246 7/15/2019
2.4.0-beta.1 725 6/28/2019
2.4.0-alpha.1 2,265 6/1/2019
2.3.0 66,732 12/17/2018
2.3.0-rc.1 2,227 12/14/2018
2.3.0-beta.6 890 12/8/2018
2.3.0-beta.5 357 12/8/2018
2.3.0-beta.4 336 12/7/2018
2.3.0-beta.3 396 12/4/2018
2.3.0-beta.2 362 11/30/2018
2.3.0-beta.1 344 11/27/2018
2.3.0-alpha.1 426 11/2/2018
2.2.0 5,223 10/19/2018
2.2.0-rc.2 384 10/13/2018
2.2.0-rc.1 372 10/13/2018
2.2.0-beta.2 383 10/12/2018
2.2.0-beta.1 393 10/11/2018
2.1.0 6,616 10/9/2018
2.1.0-beta.1 397 10/7/2018
2.0.0 1,074 10/7/2018
2.0.0-rc.3 510 9/30/2018
2.0.0-rc.2 423 9/27/2018
2.0.0-rc.1 389 9/26/2018
1.3.0 1,671 9/20/2018
1.2.0 5,473 9/3/2018
1.2.0-rc.2 13,962 9/2/2018
1.2.0-rc.1 409 9/2/2018
1.1.0 1,153 8/23/2018
1.1.0-rc.2 509 8/13/2018
1.1.0-rc.1 517 8/12/2018
1.0.1 1,104 8/2/2018
1.0.0 1,876 7/27/2018
1.0.0-rc.5 688 6/28/2018
1.0.0-rc.4 618 6/26/2018
1.0.0-rc.3 535 6/26/2018
1.0.0-rc.2 555 6/24/2018
1.0.0-rc.1 2,012 5/6/2018
1.0.0-alpha0002 884 11/17/2017
1.0.0-alpha0001 912 11/17/2017