Meziantou.Framework.FixedStringBuilder.Generator
2.0.8
Prefix Reserved
dotnet add package Meziantou.Framework.FixedStringBuilder.Generator --version 2.0.8
NuGet\Install-Package Meziantou.Framework.FixedStringBuilder.Generator -Version 2.0.8
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="Meziantou.Framework.FixedStringBuilder.Generator" Version="2.0.8" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Meziantou.Framework.FixedStringBuilder.Generator" Version="2.0.8" />
<PackageReference Include="Meziantou.Framework.FixedStringBuilder.Generator" />
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 Meziantou.Framework.FixedStringBuilder.Generator --version 2.0.8
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Meziantou.Framework.FixedStringBuilder.Generator, 2.0.8"
#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 Meziantou.Framework.FixedStringBuilder.Generator@2.0.8
#: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=Meziantou.Framework.FixedStringBuilder.Generator&version=2.0.8
#tool nuget:?package=Meziantou.Framework.FixedStringBuilder.Generator&version=2.0.8
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Meziantou.Framework.FixedStringBuilder.Generator
Source generator and analyzer to create fixed-length string structs.
Usage
Add a partial struct and decorate it with FixedStringBuilderAttribute:
[FixedStringBuilderAttribute(10)]
public partial struct FixedStringBuilder10;
The generator emits:
Microsoft.CodeAnalysis.EmbeddedAttributeFixedStringBuilderAttribute(internal partial class)- members for the target struct (constructors, interpolation support,
TryFormat, equality, etc.)
Generated fixed strings enforce capacity and throw ArgumentException when data does not fit.
Analyzer diagnostics
| Id | Category | Description | Severity | Enabled |
|---|---|---|---|---|
MFFSG0001 |
FixedStringBuilderGenerator | FixedStringBuilderAttribute requires one argument | Error | ✔️ |
MFFSG0002 |
FixedStringBuilderGenerator | FixedStringBuilderAttribute argument type is invalid | Error | ✔️ |
MFFSG0003 |
FixedStringBuilderGenerator | FixedStringBuilderAttribute length must be positive | Error | ✔️ |
MFFSG0004 |
FixedStringBuilderGenerator | FixedStringBuilderAttribute length is too large | Error | ✔️ |
MFFSG0005 |
FixedStringBuilderGenerator | FixedStringBuilderAttribute requires a partial struct | Error | ✔️ |
MFFSG0006 |
FixedStringBuilderGenerator | FixedStringBuilderAttribute does not support readonly or ref structs | Error | ✔️ |
There are no supported framework assets in this package.
Learn more about Target Frameworks and .NET Standard.
-
.NETStandard 2.0
- No dependencies.
-
net11.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 |
|---|---|---|
| 2.0.8 | 104 | 11/13/2026 |
| 2.0.7 | 106 | 11/8/2026 |
| 2.0.6 | 181 | 10/28/2026 |
| 2.0.5 | 120 | 10/21/2026 |
| 2.0.4 | 364 | 9/13/2026 |
| 2.0.3 | 133 | 9/6/2026 |
| 2.0.2 | 146 | 8/30/2026 |
| 2.0.1 | 136 | 8/29/2026 |
| 2.0.0 | 585 | 7/5/2026 |
| 1.0.4 | 471 | 6/13/2026 |
| 1.0.3 | 164 | 6/7/2026 |
| 1.0.2 | 146 | 5/23/2026 |
| 1.0.1 | 146 | 4/25/2026 |
| 1.0.0 | 158 | 4/6/2026 |