SeliseBlocks.Genesis 9.0.30

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

SeliseBlocks.Genesis

Installation

This package is automatically included in Blocks Genesis framework. No manual installation needed for Genesis-based services.

For standalone use:

dotnet add package SeliseBlocks.Genesis

Quick Start for Genesis Services

1. API Service Example

using Blocks.Genesis;
using TestDriver;

const string _serviceName = "Service-API-Test_One";

// Configure logs and secrets - LMT is automatically initialized here
await ApplicationConfigurations.ConfigureLogAndSecretsAsync(_serviceName, VaultType.Azure); // VaultType.OnPrem

var builder = WebApplication.CreateBuilder(args);
ApplicationConfigurations.ConfigureApiEnv(builder, args);

var services = builder.Services;
ApplicationConfigurations.ConfigureServices(services, new MessageConfiguration
{
    AzureServiceBusConfiguration = new()
    {
        Queues = new List<string> { "demo_queue" },
        Topics = new List<string> { "demo_topic_1" },
    },
});

ApplicationConfigurations.ConfigureApi(services);
services.AddSingleton<IGrpcClient, GrpcClient>();

var app = builder.Build();
ApplicationConfigurations.ConfigureMiddleware(app);

await app.RunAsync();

2. Worker Service Example

using Blocks.Genesis;
using WorkerOne;

const string _serviceName = "Service-Worker-Test_One";

// Configure logs and secrets - LMT is automatically initialized here
var blocksSecrets = await ApplicationConfigurations.ConfigureLogAndSecretsAsync(_serviceName, VaultType.Azure); // VaultType.OnPrem

var messageConfiguration = new MessageConfiguration
{
   AzureServiceBusConfiguration = new()
   {
       Queues = new List<string> { "demo_queue" },
       Topics = new List<string> { "demo_topic", "demo_topic_1" }
   }
};

await CreateHostBuilder(args).Build().RunAsync();

IHostBuilder CreateHostBuilder(string[] args) =>
    Host.CreateDefaultBuilder(args).ConfigureServices((services) =>
    {
        services.AddHttpClient();
        services.AddSingleton<IConsumer<W1Context>, W1Consumer>();
        services.AddSingleton<IConsumer<W2Context>, W2Consumer>();
        ApplicationConfigurations.ConfigureWorker(services, messageConfiguration);
    });

Configuration

LMT Client is automatically configured when you call ApplicationConfigurations.ConfigureLogAndSecretsAsync().

Create a .env file in your project root:

# LMT Service Bus Configuration
LogsServiceBusConnectionString=Endpoint=sb://your-logs-namespace.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=your-key
TracesServiceBusConnectionString=Endpoint=sb://your-traces-namespace.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=your-key

# Optional: Retry Configuration
MaxRetries=3
MaxFailedBatches=100

# Other service configuration
ASPNETCORE_ENVIRONMENT=Development

Important: Add .env to your .gitignore:

.env
.env.local
.env.*.local

Option 2: Using appsettings.json

{
  "Lmt": {
    "MaxRetries": 3,
    "MaxFailedBatches": 100
  }
}

Note: Service Bus connection strings must be set via environment variables (.env or system environment).

Option 3: Using Environment Variables (For Docker/Production)

export LogsServiceBusConnectionString="Endpoint=sb://your-logs-namespace.servicebus.windows.net/;..."
export TracesServiceBusConnectionString="Endpoint=sb://your-traces-namespace.servicebus.windows.net/;..."
export MaxRetries=3
export MaxFailedBatches=100

Configuration Priority

  1. .env file (loaded first, sets environment variables)
  2. System environment variables (can override .env)
  3. appsettings.json Lmt:* section (for MaxRetries and MaxFailedBatches only)
  4. Default values (MaxRetries=3, MaxFailedBatches=100)

Required vs Optional

Setting Required Source Default
LogsServiceBusConnectionString Required Environment Variable -
TracesServiceBusConnectionString Required Environment Variable -
MaxRetries Optional appsettings.json or Environment 3
MaxFailedBatches Optional appsettings.json or Environment 100

*If not configured, logs will only write to console and MongoDB (Service Bus integration is disabled).

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 (1)

Showing the top 1 NuGet packages that depend on SeliseBlocks.Genesis:

Package Downloads
SeliseBlocks.CaptchaService

Blocks Captcha Service

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
9.0.30 52 2/16/2026
9.0.29 494 1/28/2026
9.0.28 155 1/26/2026
9.0.27 150 1/20/2026
9.0.26 215 1/19/2026
9.0.25 167 12/29/2025
9.0.24 61 12/29/2025
9.0.23 57 12/29/2025
9.0.22 388 11/23/2025
9.0.21 139 11/23/2025
9.0.20 209 11/16/2025
9.0.19 194 11/16/2025
9.0.18 198 11/16/2025
9.0.17 284 11/11/2025
9.0.16 1,586 10/30/2025
9.0.15 249 10/29/2025
9.0.14 168 10/28/2025
9.0.13 151 10/26/2025
9.0.12 178 10/22/2025
9.0.11 157 10/22/2025
Loading failed