CsvForge 1.0.0

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

CsvForge

CsvForge is a flagship .NET 11 CSV engine for enterprise-grade data exports—built for speed, reliability, and NativeAOT from day one.

NuGet Downloads Build License Docs

CsvForge combines a hybrid UTF-8/UTF-16 writer, Roslyn Source Generator, checkpointed export orchestration, and streaming compression to deliver predictable, high-throughput CSV pipelines for APIs, services, batch jobs, and data platforms.


Why CsvForge

  • Performance-first engine with low-allocation hot paths.
  • 🧠 Roslyn-generated serializers for zero-reflection runtime execution.
  • 📦 NativeAOT + trimming ready for modern cloud-native deployment.
  • 🔁 Checkpointed batch exports for resumable long-running jobs.
  • 🗜️ Streaming Gzip/Zip compression for large data transfer workflows.
  • 📊 Excel compatibility mode for real-world spreadsheet consumers.

Quick Start

Install

dotnet add package CsvForge

Minimal example

using CsvForge;

public sealed class CustomerRow
{
    public int Id { get; init; }
    public string Name { get; init; } = string.Empty;
    public string Tier { get; init; } = string.Empty;
}

var rows = new[]
{
    new CustomerRow { Id = 1, Name = "Acme", Tier = "Enterprise" },
    new CustomerRow { Id = 2, Name = "Northwind", Tier = "SMB" }
};

CsvWriter.Write(rows, "customers.csv", new CsvWriterOptions
{
    IncludeHeader = true,
    ExcelCompatibilityMode = true
});

Output:

Id,Name,Tier
1,Acme,Enterprise
2,Northwind,SMB

Performance Benchmarks

CsvForge is designed for production throughput under realistic memory constraints.

Benchmark focus areas

  • UTF-8 and UTF-16 writer throughput
  • Allocation profile (Gen0/Gen1 pressure)
  • Generated writer vs runtime metadata path
  • Compression overhead under streaming workloads
  • Checkpoint frequency and recovery impact

Run local benchmarks:

dotnet run -c Release --project benchmarks/CsvForge.Benchmarks/CsvForge.Benchmarks.csproj

For methodology and reproducibility guidelines, see docs/performance.md.


CsvForge vs Traditional CSV Libraries

Capability CsvForge Traditional CSV Libraries
Serialization strategy Runtime cache + Roslyn source generation Reflection-heavy runtime mapping
Hot path allocations Span-centric, allocation-aware internals Often string/object-centric
NativeAOT compatibility First-class design target Often limited due to reflection
Checkpoint/resume Built-in export checkpoint model Usually app-level custom implementation
Compression Integrated streaming Gzip/Zip support Usually external wrappers
Excel compatibility Dedicated mode with practical defaults Inconsistent/manual options

Architecture Overview

CsvForge uses a layered architecture optimized for deterministic behavior and deployment flexibility:

  1. Core Writer Engine
    • Hybrid UTF-8/UTF-16 selection pipeline
    • Buffer and formatter components tuned for high-throughput output
  2. Type Serialization Layer
    • Roslyn Source Generator emits type-specific writers
    • Zero-reflection runtime path when generated writers are available
  3. Execution Orchestration Layer
    • Checkpoint coordinator for resumable exports
    • Compression streams and compatibility options as composable stages

Start here:


Samples

Sample guide: samples/README.md


Documentation


Roadmap

  • Full async IAsyncEnumerable pipeline optimization
  • Additional delimiter/quoting profiles for region-specific formats
  • Rich schema evolution support for versioned exports
  • Wider benchmark matrix (.NET runtimes, ARM64/x64, Linux/Windows)
  • Production diagnostics package (events/metrics dashboards)

See open work in GitHub Issues.


Contributing

Contributions are welcome—from bug fixes to benchmark improvements and source generator enhancements.


License

CsvForge is released under the MIT License. See LICENSE for details.

Product Compatible and additional computed target framework versions.
.NET 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.
  • net10.0

    • No dependencies.

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 82 3/15/2026