Bullseye 6.0.0-beta.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 6.0.0-beta.2
                    
NuGet\Install-Package Bullseye -Version 6.0.0-beta.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="6.0.0-beta.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Bullseye" Version="6.0.0-beta.2" />
                    
Directory.Packages.props
<PackageReference Include="Bullseye" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Bullseye --version 6.0.0-beta.2
                    
#r "nuget: Bullseye, 6.0.0-beta.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.
#addin nuget:?package=Bullseye&version=6.0.0-beta.2&prerelease
                    
Install Bullseye as a Cake Addin
#tool nuget:?package=Bullseye&version=6.0.0-beta.2&prerelease
                    
Install Bullseye as a Cake Tool

Bullseye

Bullseye

NuGet version

CI CodeQL analysis InferSharp Lint Spell check

AppVeyor 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" alt="Bullseye quick start output"/>

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" alt="Bullseye enumerable inputs output"/>

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 net8.0 is compatible.  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.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net8.0

    • No dependencies.
  • net9.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 (46)

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

Repository Stars
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.
AppMetrics/AppMetrics
App Metrics is an open-source and cross-platform .NET library used to record and report metrics within an application.
gothinkster/aspnetcore-realworld-example-app
ASP.NET Core backend implementation for RealWorld
servicetitan/Stl.Fusion
Build real-time apps (Blazor included) with less than 1% of extra code responsible for real-time updates. Host 10-1000x faster APIs relying on transparent and nearly 100% consistent caching. We call it DREAM, or Distributed REActive Memoization, and it's here to turn real-time on!
FakeItEasy/FakeItEasy
The easy mocking library for .NET
ProxyKit/ProxyKit
A toolkit to create code-first HTTP reverse proxies on ASP.NET Core
DuendeArchive/IdentityModel
.NET standard helper library for claims-based identity, OAuth 2.0 and OpenID Connect.
adamralph/minver
🏷 Minimalistic versioning using Git tags.
machine/machine.specifications
Machine.Specifications is a Context/Specification framework for .NET that removes language noise and simplifies tests.
DuendeArchive/IdentityModel.OidcClient
Certified C#/NetStandard OpenID Connect Client Library for native mobile/desktop Applications (RFC 8252)
elastic/apm-agent-dotnet
Particular/Workshop
SOA Done Right
JasperFx/lamar
Fast Inversion of Control Tool and Successor to StructureMap
dotnet/dotnet
Home of .NET's Virtual Monolithic Repository which includes all the code needed to build the .NET SDK.
Librelancer/Librelancer
A re-implementation of Freelancer
SQLStreamStore/SQLStreamStore
Stream Store library targeting RDBMS based implementations for .NET
XamlAnimatedGif/XamlAnimatedGif
A simple library to display animated GIF images in WPF apps (.NET Framework 4.5, .NET Core 3.1, .NET 5.0)
Version Downloads Last updated
6.0.0 1,311 9 days ago
6.0.0-beta.2 487 a month ago
6.0.0-beta.1 574 2 months ago
5.0.0 340,952 1/15/2024
5.0.0-rc.1 606 12/21/2023
5.0.0-alpha.2 909 9/25/2023
5.0.0-alpha.1 1,009 6/9/2023
4.2.1 229,712 1/24/2023
4.2.1-rc.1 587 12/3/2022
4.2.0 68,983 11/9/2022
4.2.0-beta.1 407 10/30/2022
4.1.1 34,743 10/22/2022
4.1.0 1,070 10/16/2022
4.1.0-rc.1 248 10/9/2022
4.1.0-alpha.2 414 8/28/2022
4.1.0-alpha.1 4,087 3/13/2022
4.0.0 168,039 3/12/2022
4.0.0-rc.3 334 3/11/2022
4.0.0-rc.2 7,291 12/30/2021
4.0.0-rc.1 311 12/23/2021
4.0.0-beta.1 2,910 11/7/2021
4.0.0-alpha.2 287 11/6/2021
4.0.0-alpha.1 606 9/19/2021
3.8.0 1,079,126 8/20/2021
3.8.0-rc.1 478 8/3/2021
3.8.0-beta.1 266 7/28/2021
3.8.0-alpha.2 233 7/25/2021
3.8.0-alpha.1 245 7/25/2021
3.7.1 32,213 7/12/2021
3.7.0 708,129 1/20/2021
3.7.0-alpha.1 608 1/7/2021
3.6.0 40,453 1/1/2021
3.6.0-rc.1 1,312 12/22/2020
3.6.0-beta.1 346 12/4/2020
3.5.0 107,995 9/19/2020
3.5.0-rc.1 500 9/4/2020
3.4.0 51,501 7/26/2020
3.4.0-alpha.1 492 6/24/2020
3.3.0 256,762 4/2/2020
3.3.0-beta.1 449 3/6/2020
3.2.0 13,776 2/20/2020
3.2.0-rc.1 454 2/9/2020
3.2.0-alpha.2 642 12/26/2019
3.2.0-alpha.1 420 12/23/2019
3.1.0 98,576 12/7/2019
3.1.0-rc.1 998 11/13/2019
3.1.0-alpha.1 557 10/16/2019
3.0.0 66,142 10/13/2019
3.0.0-rc.1 4,353 9/8/2019
3.0.0-beta.3 894 8/27/2019
3.0.0-beta.2 276 8/25/2019
3.0.0-beta.1 297 8/25/2019
3.0.0-alpha.1 285 8/24/2019
2.4.0 6,853 7/27/2019
2.4.0-rc.2 17,234 7/15/2019
2.4.0-rc.1 261 7/15/2019
2.4.0-beta.1 740 6/28/2019
2.4.0-alpha.1 2,282 6/1/2019
2.3.0 67,911 12/17/2018
2.3.0-rc.1 2,241 12/14/2018
2.3.0-beta.6 906 12/8/2018
2.3.0-beta.5 372 12/8/2018
2.3.0-beta.4 349 12/7/2018
2.3.0-beta.3 410 12/4/2018
2.3.0-beta.2 383 11/30/2018
2.3.0-beta.1 363 11/27/2018
2.3.0-alpha.1 442 11/2/2018
2.2.0 5,306 10/19/2018
2.2.0-rc.2 402 10/13/2018
2.2.0-rc.1 390 10/13/2018
2.2.0-beta.2 401 10/12/2018
2.2.0-beta.1 410 10/11/2018
2.1.0 6,855 10/9/2018
2.1.0-beta.1 416 10/7/2018
2.0.0 1,148 10/7/2018
2.0.0-rc.3 530 9/30/2018
2.0.0-rc.2 443 9/27/2018
2.0.0-rc.1 409 9/26/2018
1.3.0 1,750 9/20/2018
1.2.0 5,575 9/3/2018
1.2.0-rc.2 13,984 9/2/2018
1.2.0-rc.1 428 9/2/2018
1.1.0 1,230 8/23/2018
1.1.0-rc.2 530 8/13/2018
1.1.0-rc.1 538 8/12/2018
1.0.1 1,196 8/2/2018
1.0.0 2,276 7/27/2018
1.0.0-rc.5 703 6/28/2018
1.0.0-rc.4 640 6/26/2018
1.0.0-rc.3 550 6/26/2018
1.0.0-rc.2 570 6/24/2018
1.0.0-rc.1 2,027 5/6/2018
1.0.0-alpha0002 977 11/17/2017
1.0.0-alpha0001 1,003 11/17/2017