Klarfakt 1.0.0-preview.2

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

Klarfakt

Read and validate EN 16931 electronic invoices in .NET — no Java, no Node.js, no native dependencies, and nothing leaves your server.

Klarfakt runs the publishers' own compiled Schematron in-process: the same artefacts the German reference validator executes, fetched from their pinned upstream releases and checked against a recorded SHA-256. 97 of 97 comparable files agree rule for rule with KoSIT's validationtool on every CI run.

using Klarfakt;
using Klarfakt.Validation;

var catalog = RulePackCatalog.Load();
if (!catalog.IsRestored) await catalog.RestoreAsync();   // once, at deployment or build

// Compiling takes seconds, validating takes milliseconds. Keep one; it is thread-safe.
var validator = new InvoiceValidator(catalog);

var document = InvoiceDocument.Load("invoice.xml");      // or a Factur-X / ZUGFeRD PDF
var result = validator.Validate(document);               // rule set chosen from the invoice itself

foreach (var error in result.Errors)
{
    Console.WriteLine($"{error.RuleId} at {error.Location}: {error.Message}");
}
BR-CL-04 at /ubl-invoice:Invoice/cbc:DocumentCurrencyCode: Invoice currency code
MUST be coded using ISO code list 4217 alpha-3

What it covers

Syntaxes UBL 2.1 Invoice and CreditNote, CII D16B, and the XML inside a hybrid Factur-X / ZUGFeRD 2.x PDF
Rule sets EN 16931, Peppol BIS Billing 3.0, XRechnung 3.0.2
Render a self-contained HTML page from KoSIT's official XRechnung visualisation
Frameworks net8.0, net10.0

Findings carry the rule id, severity, location, the failing XPath test, the BT/BG business terms, the offending value where the rule pointed at one, and which artefact produced them — so a CEN core rule is distinguishable from a German CIUS rule.

Rule artefacts

They are not in this package. The CEN rules are EUPL-1.2 and the KoSIT configurations are Apache-2.0, so they stay with their publishers and are downloaded on request:

klarfakt rules restore

Plain HTTPS from the pinned upstream release, every file checked against the SHA-256 in the embedded manifest before it is written, and again before first use. Nothing else in Klarfakt touches the network. Set KLARFAKT_RULES to point at a directory you manage yourself for air-gapped deployments.

Licence

Free unless your organisation turns over more than €1,000,000 a year. Free at any size inside OSI-licensed open source. Free always for evaluation, development, CI and internal testing.

Above that threshold and in production, a commercial licence is €690 a year for unlimited developers, deployments and validations, covering every version released during the term permanently. Every version becomes Apache 2.0 four years after it ships — 1.x on 2030-09-04. Terms are Business Source License 1.1, which is not an OSI-approved licence.

Documentation, samples and source · licensing@klarfakt.dev

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 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-preview.2 32 9/8/2026
1.0.0-preview.1 37 9/8/2026