Bnsights.MicroServices.SharedLibrary 1.0.40

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

Bnsights.Microservices.SharedLibrary

Overview

This NuGet package contains a suite of shared libraries used across multiple microservices in the TDRA ecosystem, focused on standardizing and simplifying cross-cutting concerns such as:

  • Database initialization and seeding
  • RabbitMQ messaging
  • Consul service discovery and configuration
  • Hangfire job scheduling
  • Common interfaces, entities, and extension methods
  • Centralized logging and reusable utilities

🛑 Important Note:
This shared library depends on TDRA.Protos.dll (built from .proto files).
You must manually build TDRA.Protos.csproj before publishing or consuming this package, as it is not part of this solution and changes frequently.
Make sure it's built and present in ../gRPC/TDRA.Protos/TDRA.Protos/bin/Debug/net8.0/TDRA.Protos.dll.


Solution Structure

The main project to publish is:

  • TDRA.Microservices.Shared.SharedLibrarythis project references all others and should be published as the NuGet package.

Referenced modules include:

  • TDRA.Microservices.Shared.Consul
  • TDRA.Microservices.Shared.RabbitMQ
  • TDRA.Microservices.Shared.HangfireJobs
  • TDRA.Microservices.Shared.Sql
  • TDRA.Microservices.Shared.UnifiedUserContext

Features

🗃️ Shared Database Initialization

  • IDatabaseInitializer.Initialize() — runs EF Core migrations and optional seeding logic
  • Accepts ILogger<T> — supports centralized, microservice-level logging

🐇 RabbitMQ Integration

  • Publisher/consumer setup using IRabbitMQPublisher and RabbitMQConsumerService<T>
  • Configurable exchanges, queues, and routing keys

🧭 Consul Integration

  • Service registration and dynamic configuration using Winton.Extensions.Configuration.Consul
  • Health check endpoint: /health

⏱ Hangfire Job Scheduling

  • Easily integrate recurring or background jobs using JobsLogic
  • Register Hangfire with:
    builder.Services.AddHangfireServices(configuration["ConnectionStrings:ClientAppContext_DB"]);
    app.UseHangFire();
    
    ## Version 1.0.13
    
    

Localization Enhancements

  • Caching: Implemented a robust caching mechanism for localization resources to significantly improve performance.
  • Client Logic Interface: Introduced a new interface for client-side localization logic, providing a standardized way to handle localizations.
  • New Registration Method: Added the RegisterLocalizationsAsync method.
    • Action Required: This method must be called during the startup sequence of any new microservice to ensure the localization cache is populated correctly.

Version 1.0.24

✨ Observability & Centralized Logging
  • Enhanced Logging: Added comprehensive logging logic directly into each service file, ensuring standardized log generation across all microservices.
  • Elasticsearch Integration: Logs are now written directly to Elasticsearch, enabling powerful searching, analysis, and visualization in Kibana.
  • Distributed Tracing: Implemented full observability by writing traces to both Jaeger and Elasticsearch, providing deep insights into request flows and performance bottlenecks.
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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. 
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.40 156 8/28/2025
1.0.39 184 8/26/2025
1.0.38 171 8/26/2025
1.0.37 135 8/25/2025
1.0.36 125 8/18/2025
1.0.35 115 8/18/2025
1.0.34 121 8/18/2025
1.0.33 120 8/18/2025
1.0.32 114 8/17/2025
1.0.31 146 8/13/2025
1.0.30 340 8/7/2025
1.0.29 196 8/7/2025
1.0.28 191 7/28/2025
1.0.27 182 7/26/2025
1.0.26 215 7/26/2025
1.0.25 220 7/26/2025
1.0.24 216 7/26/2025
1.0.23 380 7/21/2025
1.0.22 374 7/21/2025
1.0.21 208 7/20/2025
1.0.20 194 7/20/2025
1.0.19 194 7/20/2025
1.0.18 193 7/20/2025
1.0.17 126 7/17/2025
1.0.16 133 7/17/2025
1.0.15 126 7/17/2025
1.0.14 141 7/17/2025
1.0.13 136 7/16/2025
1.0.12 228 7/14/2025
1.0.11 133 7/13/2025
1.0.9 182 7/7/2025
1.0.8 184 6/23/2025
1.0.7 180 6/19/2025
1.0.6 150 6/19/2025
1.0.5 149 6/18/2025
1.0.4 148 6/18/2025
1.0.3 147 6/18/2025
1.0.2 146 6/18/2025
1.0.1 165 6/17/2025
1.0.0 145 6/17/2025