Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
B

bullseye

> 编程语言
Open source

A .NET library, developed by humans, for running a target dependency graph.

955 stars0 likes0 views
WebsiteGitHub

About

A .NET library, developed by humans, for running a target dependency graph.

Bullseye

Bullseye is a .NET library, developed by humans, for running a target dependency graph.

Bullseye is typically used 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. Bullseye is useful for any program which performs a series of operations.

Platform support: .NET 8.0 and later.

  • Quick start
  • Sample wrapper scripts
  • Enumerable inputs
  • Command-line arguments
  • Non-static API
  • NO_COLOR
  • Who's using Bullseye?

Quick start

  • Next to an existing .NET solution (.sln/.slnx file), add a .NET console app named Targets — dotnet new console --name Targets1
  • Change to the new directory — cd Targets
  • Add a reference to Bullseye — dotnet add package Bullseye
  • Add a reference to SimpleExec — dotnet add package SimpleExec
  • Replace the contents of Targets/Program.cs with:
    csharp
    using static Bullseye.Targets;
    using static SimpleExec.Command;
    
    Target("build", () => RunAsync("dotnet", "build --configuration Release"));
    Target("test", dependsOn: ["build"], () => RunAsync("dotnet", "test --configuration Release --no-build"));
    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 just wrote and ran your first Bullseye build program.

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

  1. You could use a file-based C# program instead, but, at the time of writing, IDE support for file-based C# programs is not complete, so if you want full debugging, Intellisense, etc., it's a better to use a .NET console app.

Sample wrapper scripts

build (Linux and macOS)

bash
#!/usr/bin/env bash
set -euo pipefail
dotnet run --project Targets -- "$@"

build.cmd (Windows)

batchfile
@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:

csharp
Target(
    "test",
    dependsOn: ["build"],
    forEach: ["./FooTests.Acceptance", "./FooTests.Performance"],
    project => RunAsync($"dotnet", $"test {project} --configuration Release --no-build"));
bash
dotnet run --project Targets -- test

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 (CLI), 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:

bash
dotnet run --project Targets -- --help
bash
./build --help
batchfile
./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:

  • System.CommandLine
  • McMaster.Extensions.CommandLineUtils

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.

csharp
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:

  • AspNetCore.AsyncInitialization
  • Config.SqlStreamStore
  • ConfigR
  • Elastic
  • EssentialMVVM
  • FakeItEasy
  • Fluxzy
  • HumanBytes
  • Ibento
  • IdentityModel
  • IdentityServer
  • Iso8601DurationHelper
  • Linq.Extras
  • LittleForker
  • LykkeOSS
  • Marten
  • MinVer
  • Particular
  • ProxyKit
  • PseudoLocalizer
  • Radical Framework
  • RealWorld
  • SelfInitializingFakes
  • SendComics
  • SqlStreamStore.Locking
  • SQLStreamStore
  • Statik
  • Tasty
  • TemplatedConfiguration
  • Xenial

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


Target by Franck Juncker from the Noun Project.

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

C#

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言