BeyondNetCode.Shell.Bootstrapper.DependencyInjection 1.0.0

dotnet add package BeyondNetCode.Shell.Bootstrapper.DependencyInjection --version 1.0.0
                    
NuGet\Install-Package BeyondNetCode.Shell.Bootstrapper.DependencyInjection -Version 1.0.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.
<PackageReference Include="BeyondNetCode.Shell.Bootstrapper.DependencyInjection" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="BeyondNetCode.Shell.Bootstrapper.DependencyInjection" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="BeyondNetCode.Shell.Bootstrapper.DependencyInjection" />
                    
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 BeyondNetCode.Shell.Bootstrapper.DependencyInjection --version 1.0.0
                    
#r "nuget: BeyondNetCode.Shell.Bootstrapper.DependencyInjection, 1.0.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 BeyondNetCode.Shell.Bootstrapper.DependencyInjection@1.0.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=BeyondNetCode.Shell.Bootstrapper.DependencyInjection&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=BeyondNetCode.Shell.Bootstrapper.DependencyInjection&version=1.0.0
                    
Install as a Cake Tool

<div align="center"> <h1>BeyondNet.Bootstrapper</h1> <p><strong>A lightweight, extensible library for orchestrating .NET application startup</strong></p>

<p> <a href="README.en.md">🇬🇧 English</a> | <a href="README.es.md">🇪🇸 Español</a> </p>

<p> <a href="https://www.nuget.org/profiles/BeyondNetCode"> <img src="https://img.shields.io/badge/NuGet-BeyondNetCode-blue" alt="NuGet" /> </a> <a href="https://github.com/beyondnetcode/Shell.Bootstrapper/actions"> <img src="https://github.com/beyondnetcode/Shell.Bootstrapper/workflows/CI%20/%20CD/badge.svg" alt="Build" /> </a> </p> </div>


Welcome to BeyondNet.Bootstrapper! A lightweight, extensible library for orchestrating the startup sequence of any .NET application or library. Based on the Composite pattern, it lets you encapsulate each initialization step as an independent, testable unit.

Built on .NET 10 with full support for async/await, Nullable Reference Types, and a Cloud Native observability stack.

Installation

NuGet Packages

# Core (always required)
dotnet add package BeyondNetCode.Shell.Bootstrapper

# Official adapters (add as needed)
dotnet add package BeyondNetCode.Shell.Bootstrapper.DependencyInjection
dotnet add package BeyondNetCode.Shell.Bootstrapper.AutoMapper
dotnet add package BeyondNetCode.Shell.Bootstrapper.Observability

Packages Overview

Package Description NuGet
BeyondNetCode.Shell.Bootstrapper Core bootstrapper with Composite pattern link
BeyondNetCode.Shell.Bootstrapper.DependencyInjection DI extension adapter link
BeyondNetCode.Shell.Bootstrapper.AutoMapper AutoMapper configuration adapter link
BeyondNetCode.Shell.Bootstrapper.Observability OpenTelemetry + Serilog adapter link

Why BeyondNet.Bootstrapper?

Without a standard, startup code tends to become a monolithic block in Program.cs that is hard to test and maintain. This library solves that by enforcing a single rule:

Each initialization concern lives in its own class. The Composite runs them in order.

Benefits:

  • Each bootstrapper is independently unit-testable
  • The startup sequence is explicit and readable
  • Adding or removing a step never changes surrounding code
  • Async I/O at startup cannot deadlock the application

Quick Start

Synchronous Bootstrapper

public class MyBootstrapper : IBootstrapper
{
    public void Run()
    {
        // Initialize your service
        Console.WriteLine("Bootstrap complete!");
    }
}

// Use
new CompositeBootstrapper()
    .Add(new MyBootstrapper())
    .Run();

Asynchronous Bootstrapper

public class MyAsyncBootstrapper : IBootstrapperAsync
{
    public async Task RunAsync()
    {
        await Task.Delay(100);
        Console.WriteLine("Async bootstrap complete!");
    }
}

// Use
await new CompositeBootstrapperAsync()
    .Add(new MyAsyncBootstrapper())
    .RunAsync();

Combining with Adapters

var composite = new CompositeBootstrapperAsync()
    .Add(new DependencyInjectionBootstrapper(services =>
    {
        services.AddSingleton<IMyService, MyService>();
    }))
    .Add(new AutoMapperBootstrapper(cfg =>
    {
        cfg.CreateMap<Source, Dest>();
    }))
    .Add(new ObservabilityBootstrapper(services, config))
    .Add(new MyCustomBootstrapper());

await composite.RunAsync();

Documentation

For detailed documentation, see the language-specific README files:

Migration from Ums.Shell.Bootstrapper

If you were using Ums.Shell.Bootstrapper, update your NuGet references:

# Before (Ums.Shell.Bootstrapper)
dotnet add package Ums.Shell.Bootstrapper

# After (BeyondNetCode.Shell.Bootstrapper)
dotnet add package BeyondNetCode.Shell.Bootstrapper

Update namespaces in your code:

// Before
using Ums.Shell.Bootstrapper;

// After
using BeyondNetCode.Shell.Bootstrapper;

Contributing

See CONTRIBUTING.md for GitFlow workflow, commit conventions, and coding standards.

Versioning

See VERSIONING.md for SemVer strategy and release process.

License

Licensed under the Apache 2.0 License. See LICENSE for details.

Acknowledgments

See DISCLAIMER.md for original code authorship attribution.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  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. 
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
1.0.0 39 5/30/2026