MarcinBorecki.KsefKit.DependencyInjection 2.3.0

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

KsefKit

A production-grade .NET framework for KSeF (Poland's National e-Invoicing System). Self-contained — the KSeF HTTP/JSON protocol layer lives inside KsefKit.dll under KsefKit.Protocol.* (internal), so consumers restore from nuget.org only (no private feed, no PAT).

🇵🇱 Runs on .NET Framework 4.6.2 through 4.8.1 (legacy ERP / accounting / WCF / WinForms apps) and on .NET 5 – 10 (modern services) from the same NuGet package.

Full documentation, 22 tutorials, architecture, cheatsheets, and migration guides live in the GitHub repository: marcinborecki/KsefKit.


Packages

Package What it does
MarcinBorecki.KsefKit Core: domain model, fluent API (Query / Build / Send), SDK bridge, exception taxonomy, retry policy, XAdES signing, PII redaction.
MarcinBorecki.KsefKit.DependencyInjection One-line DI bootstrap: services.AddKsefKit(KsefEnvironment.Test).
MarcinBorecki.KsefKit.Rendering.Console Opt-in console renderers for FA(3) invoices, invoice lists, certificate inventories.

Quick start (30 seconds)

dotnet add package MarcinBorecki.KsefKit
dotnet add package MarcinBorecki.KsefKit.DependencyInjection
using KsefKit;
using KsefKit.Domain;
using Microsoft.Extensions.DependencyInjection;

var services = new ServiceCollection();
services.AddKsefKit(KsefEnvironment.Test);
var provider = services.BuildServiceProvider();
var kit = provider.GetRequiredService<KsefKitClient>();

// Search recent invoices (auto-paging, auto 3-month chunking):
await foreach (var invoice in kit.Invoices.Query()
    .AsSeller()
    .IssuedBetween(DateTime.UtcNow.AddDays(-30), DateTime.UtcNow)
    .StreamAllAsync(ct))
{
    Console.WriteLine($"{invoice.KsefNumber} — {invoice.GrossTotal:C}");
}

What KsefKit adds on top of the official SDK

  • Domain model — first-class Invoice, Seller, Buyer, InvoiceLine, VatBreakdownEntry, InvoiceTotals records
  • Fluent APIkit.Invoices.Build().Standard()..., kit.Invoices.Query().AsSeller()..., kit.Invoices.Send(invoice).Online()...
  • Three-mode invoice issuance — Online / Offline-prepare / Upload-pending
  • UPO (Urzędowe Poświadczenie Odbioru — Official Receipt Acknowledgement) retrieval with exponential-backoff polling
  • Exception taxonomy with IsTransient, RetryAfter, KsefCode, CorrelationId
  • PII redaction for NIP, PESEL, e-mail, KSeF number, SHA-256 fingerprints
  • PROD safety guard — accidental production issuance throws InvoiceIssuanceBlockedOnProductionException unless explicitly opted in
  • Cross-platform crypto via BouncyCastle — same code on Windows, macOS, Linux
  • Source Link — F11 in the debugger steps directly into KsefKit source on GitHub

Runtime support

Package Target frameworks
KsefKit, KsefKit.DependencyInjection, KsefKit.TestInfrastructure netstandard2.0 + native net48 + native net481
KsefKit.Rendering.Console netstandard2.0 + native net48 + native net481 + net8.0 + net10.0
Target Runs on
netstandard2.0 .NET Framework 4.6.2 → 4.7.2, .NET Core 2.0+, .NET 5 / 6 / 7 / 8 / 9 / 10
net48 / net481 (native) .NET Framework 4.8 / 4.8.1 — clean consumption from packages.config legacy hosts (no transitive Microsoft.AspNetCore.*)
net8.0 (rendering) .NET 8
net10.0 (rendering) .NET 10

On .NET 10 call Net10SignedXmlBootstrap.Initialize() once (or let AddKsefKit do it) to unlock the new SHA-1 / RSA SignedXml restrictions transparently.

For legacy packages.config hosts, see the consuming-from-packages-config tutorial in the project repositorydocs/tutorials/23-consuming-from-packages-config.md.


License and source

  • MIT — see LICENSE
  • Source, docs, issuesgithub.com/marcinborecki/KsefKit
  • If KsefKit saves you time, star the repo — it's the single strongest signal that keeps the project maintained.
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 is compatible.  net481 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos 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 MarcinBorecki.KsefKit.DependencyInjection:

Package Downloads
MarcinBorecki.KsefKit.TestInfrastructure

Test infrastructure for KsefKit — xUnit fixtures and TestInvoiceFactory for integration / consumer smoke tests. Native targets: netstandard2.0 + net48 + net481.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.3.0 166 4/30/2026
2.2.0 150 4/30/2026
2.1.0 493 4/22/2026