Bullseye 4.2.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Bullseye --version 4.2.0
                    
NuGet\Install-Package Bullseye -Version 4.2.0
                    
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.

                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.

                    
Directory.Packages.props

                    
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 4.2.0
                    
#r "nuget: Bullseye, 4.2.0"
                    
#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.
#:package Bullseye@4.2.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Bullseye&version=4.2.0
                    
Install as a Cake Addin
#tool nuget:?package=Bullseye&version=4.2.0
                    
Install as a Cake Tool

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 targets can do anything. They are not restricted to building .NET projects.

Platform support: .NET Standard 2.1 and later.

Quick start

  • Create a .NET console app named targets and add a reference to Bullseye.

  • Replace the contents of Program.cs with:

    using static Bullseye.Targets;
    
    class Program
    {
        static async Task Main(string[] args)
        {
            Target("default", () => System.Console.WriteLine("Hello, world!"));
            await RunTargetsAndExitAsync(args);
        }
    }
    
  • Run the app. E.g. dotnet run or F5 in Visual Studio:

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

For help, run dotnet run -- --help.

Also see the async quick start.

Defining dependencies

Target("make-tea", () => Console.WriteLine("Tea made."));
Target("drink-tea", DependsOn("make-tea"), () => Console.WriteLine("Ahh... lovely!"));
Target("walk-dog", () => Console.WriteLine("Walkies!"));
Target("default", DependsOn("drink-tea", "walk-dog"));

Enumerable inputs

Target(
    "eat-biscuits",
    ForEach("digestives", "chocolate hobnobs"),
    biscuits => Console.WriteLine($"Mmm...{biscuits}! Nom nom."));
dotnet run -- eat-biscuits

Sample wrapper scripts

  • build

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

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

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.

FAQ

Can I force a pause before exiting when debugging in Visual Studio 2017 (or earlier)?

Yes! Add the following line anywhere before calling RunTargetsAndExitAsync:

AppDomain.CurrentDomain.ProcessExit += (s, e) => Console.ReadKey();

Note that the common way to do this for .NET console apps is to add a line such as the following before the end of the Program.Main method:

Console.ReadKey();

This does not work after calling RunTargetsAndExitAsync because that is the final statement that will be executed.

In Visual Studio 2019 and later, .NET console apps pause before exiting by default, so none of this is required.

Who's using Bullseye?

To name a few:

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


Target by Franck Juncker from the Noun Project.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  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 was computed.  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.  net9.0 was computed.  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.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETStandard 2.1

    • No dependencies.

NuGet packages (9)

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

Dex.IdentityServer4

OpenID Connect and OAuth 2.0 Framework for ASP.NET Core

Xenial.Beer

Beer - Delicious dotnet build tools

GitHub repositories (49)

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.
realworld-apps/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.
SnapXL/SnapX
SnapX is a free, open-source, cross-platform tool that lets you capture or record any area of your screen and instantly share it with a single keypress. Upload images, videos, text, and more to multiple supported destinations—all with ease. ShareX fork
adamralph/minver
🏷 Minimalist .NET packages, developed by humans, for versioning software or content using Git tags.
cofoundry-cms/cofoundry
Cofoundry is an extensible and flexible .NET Core CMS & application framework focusing on code first development
machine/machine.specifications
Machine.Specifications is a Context/Specification framework for .NET that removes language noise and simplifies tests.
adamralph/simple-exec
🏃 A .NET library, developed by humans, for running external commands.
DuendeArchive/IdentityModel.OidcClient
Certified C#/NetStandard OpenID Connect Client Library for native mobile/desktop Applications (RFC 8252)
Librelancer/Librelancer
A re-implementation of Freelancer
JasperFx/lamar
Fast Inversion of Control Tool and Successor to StructureMap
elastic/apm-agent-dotnet
Particular/Workshop
SOA Done Right
Version Downloads Last Updated
6.3.0 430 10/5/2026
6.3.0-rc.1 1,621 9/26/2026
6.2.0 11,724 9/5/2026
6.2.0-rc.1 1,518 5/14/2026
6.2.0-alpha.3 302 12/27/2025
6.2.0-alpha.2 192 12/25/2025
6.2.0-alpha.1 198 12/25/2025
6.1.0 396,863 12/27/2025
6.1.0-rc.2 113 12/27/2025
6.1.0-rc.1 1,111 12/21/2025
6.0.0 364,236 4/2/2025
6.0.0-beta.2 2,400 3/10/2025
6.0.0-beta.1 726 2/23/2025
5.0.0 682,963 1/15/2024
5.0.0-rc.1 745 12/21/2023
5.0.0-alpha.2 1,041 9/25/2023
5.0.0-alpha.1 1,199 6/9/2023
4.2.1 316,580 1/24/2023
4.2.1-rc.1 741 12/3/2022
4.2.0 81,372 11/9/2022
Loading failed