Incursa.Generators 2026.3.9.47

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

Incursa.Generators

Incursa.Generators is a Roslyn source generator package for creating strongly typed domain models from JSON and XML definition files.

It is designed for teams that want consistency, type safety, and low-boilerplate patterns for identifiers, enums, and DTO-style models.

What It Generates

  • String-backed value types
  • GUID-backed and FastId-backed identifiers
  • Number-backed and string-backed enums
  • Multi-value and generic-backed types
  • DTO and entity models

Installation

<ItemGroup>
  <PackageReference Include="Incursa.Generators" Version="x.x.x" PrivateAssets="all" />
</ItemGroup>

Quick Start

  1. Add definition files (for example *.string.json, *.enum.json, *.dto.json, *.dto.xml) to your project.
  2. Build your project.
  3. Use the generated .g.cs files as normal domain types.

Example string-backed type definition:

{
  "name": "EmailAddress",
  "namespace": "MyApp.Domain",
  "regex": "^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$"
}

Configuration

Optional custom header for generated code:

<PropertyGroup>
  <GeneratedCodeLicenseHeader>// Copyright (c) Your Company</GeneratedCodeLicenseHeader>
</PropertyGroup>

Generated Type Characteristics

  • Strongly typed and partial
  • Built-in conversion and parsing patterns (where applicable)
  • Validation-aware for supported definitions
  • Clear diagnostics for invalid inputs

Diagnostics

The package emits diagnostics (BG00x) for malformed definitions, duplicate outputs, and generation errors to help identify issues early during build.

Compatibility

  • Generator package target: netstandard2.0
  • Consumer projects: modern SDK-style C# projects (including .NET 8+ and .NET 10)

Documentation and Samples

Support

There are no supported framework assets in this 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
2026.3.9.47 622 3/9/2026
2026.3.8.1330 115 3/8/2026
2026.3.8.337 104 3/8/2026
2026.3.8.304 108 3/8/2026
2026.3.8.141 102 3/8/2026
2026.3.8.24 105 3/8/2026
2026.2.19.38 613 2/19/2026

Includes Incursa naming updates, .slnx migration support, and .NET 10 compatible test/build flow.