Baubit 2025.7.8

Additional Details

The package has been broken down to smaller projects with granular concerns. Look for Baubit.* packages on nuget.

There is a newer version of this package available.
See the version list below for details.
dotnet add package Baubit --version 2025.7.8
                    
NuGet\Install-Package Baubit -Version 2025.7.8
                    
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="Baubit" Version="2025.7.8" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Baubit" Version="2025.7.8" />
                    
Directory.Packages.props
<PackageReference Include="Baubit" />
                    
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 Baubit --version 2025.7.8
                    
#r "nuget: Baubit, 2025.7.8"
                    
#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 Baubit@2025.7.8
                    
#: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=Baubit&version=2025.7.8
                    
Install as a Cake Addin
#tool nuget:?package=Baubit&version=2025.7.8
                    
Install as a Cake Tool

Baubit is a framework for developing modular apps in .NET

CircleCI

Get started

Creating a module requires creating at least 2 classes - One for the module itself and another for the associated configuration

public class MyConfiguration : AConfiguration
{
  public string MyStringProperty { get; set; }
}

public class MyModule : AModule<MyConfiguration>
{
  protected MyModule(ConfigurationSource configurationSource) : base(configurationSource)
  {

  }

  protected MyModule(IConfiguration configuration) : base(configuration)
  {

  }
  protected MyModule(MyConfiguration configuration,
                     List<AModule> nestedModules) : base(configuration, nestedModules)
  {
  }
  public override void Load(IServiceCollection services)
  {
    var myStrProp = Configuration.MyStringProperty;
    // add required services to the IServiceCollection based on the module's configuration
    base.Load(services);
  }
}

Loading modules

myConfig.json

{
  "modules": [
    {
      "type": "MyProject.MyModule, MyProject",
      "parameters": {
        "configuration": {
          "myStringProperty" : "some string value"
          }
        }
    }
  ]
}

Using HostApplicationBuilder

var hostApplicationBuilder = new HostApplicationBuilder();
hostApplicationBuilder.Configuration.AddJsonFile("myConfig.json");
new ServiceProviderFactoryRegistrar().UseDefaultServiceProviderFactory(hostApplicationBuilder);
var host = hostApplicationBuilder.Build();
host.Run();

Using WebApplicationBuilder

var webAppBuilder = WebApplication.CreateBuilder();
webAppBuilder.Configuration.AddJsonFile("myConfig.json");
new ServiceProviderFactoryRegistrar().UseDefaultServiceProviderFactory(webAppBuilder.Host);
var webApp = webAppBuilder.Build()
webApp.Run();

Nesting Modules

Modules can be loaded side by side. <br> They can also be loaded as a nested module (sub-module)

public class AnotherModuleConfiguration : AConfiguration
{
  public string AnotherStringProperty { get; set; }
}

public class AnotherModule : AModule<AnotherModuleConfiguration>
{
  protected AnotherModule(ConfigurationSource configurationSource) : base(configurationSource)
  {

  }

  protected AnotherModule(IConfiguration configuration) : base(configuration)
  {

  }
  protected AnotherModule(AnotherModuleConfiguration configuration,
                          List<AModule> nestedModules) : base(configuration, nestedModules)
  {
  }
  public override void Load(IServiceCollection services)
  {
    var anotherStringProperty = Configuration.AnotherStringProperty;
    // add required services to the IServiceCollection based on the module's configuration
    base.Load(services);
  }
}

myConfig.json

{
  "modules": [
    {
      "type": "MyProject.MyModule, MyProject",
      "parameters": {
        "configuration": {
          "myStringProperty" : "some string value",
          "modules": [
              {
                "type": "MyProject.AnotherModule, MyProject",
                "parameters": {
                  "configuration": {
                    "anotherStringProperty" : "another string value"
                    }
                  }
              }
            ]
          }
        }
    }
  ]
}

Linking configurations

Module configurations can be loaded by referencing a json file<br> myConfig.json

{
  "modules": [
    {
      "type": "MyProject.MyModule, MyProject",
      "parameters": {
        "configuration": {
          "myStringProperty" : "some string value",
          "modules": [
              {
                "type": "MyProject.AnotherModule, MyProject",
                "parameters": {
                  "configurationSource": {
                    "jsonUriStrings" : ["anotherModule.json"]
                    }
                  }
              }
            ]
          }
        }
    }
  ]
}

anotherModule.json

{
  "anotherStringProperty" : "another string value"
}
Product Compatible and additional computed target framework versions.
.NET 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.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (3)

Showing the top 3 NuGet packages that depend on Baubit:

Package Downloads
Baubit.Aggregation

Package Description

Baubit.xUnit

Package Description

Baubit.Autofac

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2025.23.1 433 6/4/2025 2025.23.1 is deprecated because it is no longer maintained.
2025.18.5 381 5/6/2025 2025.18.5 is deprecated because it is no longer maintained.
2025.15.6 354 4/12/2025 2025.15.6 is deprecated because it is no longer maintained.
2025.14.6 525 4/5/2025 2025.14.6 is deprecated because it is no longer maintained.
2025.13.14 363 3/30/2025 2025.13.14 is deprecated because it is no longer maintained.
2025.13.13 342 3/30/2025 2025.13.13 is deprecated because it is no longer maintained.
2025.13.12 343 3/30/2025 2025.13.12 is deprecated because it is no longer maintained.
2025.13.11 346 3/30/2025 2025.13.11 is deprecated because it is no longer maintained.
2025.13.10 343 3/30/2025 2025.13.10 is deprecated because it is no longer maintained.
2025.13.9 425 3/30/2025 2025.13.9 is deprecated because it is no longer maintained.
2025.13.8 456 3/30/2025 2025.13.8 is deprecated because it is no longer maintained.
2025.13.7 650 3/30/2025 2025.13.7 is deprecated because it is no longer maintained.
2025.11.2 415 3/14/2025 2025.11.2 is deprecated because it is no longer maintained.
2025.10.4 539 3/6/2025 2025.10.4 is deprecated because it is no longer maintained.
2025.10.1 531 3/6/2025 2025.10.1 is deprecated because it is no longer maintained.
2025.7.10 455 2/16/2025 2025.7.10 is deprecated because it is no longer maintained.
2025.7.9 415 2/16/2025 2025.7.9 is deprecated because it is no longer maintained.
2025.7.8 413 2/15/2025 2025.7.8 is deprecated because it is no longer maintained.