Albatross.CodeGen.CSharp 9.0.2-200.main

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

Albatross.CodeGen.CSharp

Legacy C# code generation library providing expressions, declarations, and code constructs for runtime C# code generation. This library predates the Roslyn-based approach but remains useful for simple runtime code generation scenarios.

Key Features

  • C# declarations: classes, interfaces, enums, methods, properties, fields, constructors
  • Expression support: lambda, anonymous methods, switch, foreach, if/else, string interpolation
  • Namespace and using statement generation
  • Attribute expression support
  • Access modifier keywords (public, private, protected, internal)
  • Literal expressions for common types (int, string, bool, decimal, float, double)

Quick Start

using Albatross.CodeGen.CSharp.Declarations;
using Albatross.CodeGen.CSharp.Expressions;

// Create a C# class declaration
var classDecl = new ClassDeclaration("User")
    .AddProperty(new PropertyDeclaration("Id", new TypeExpression("int")))
    .AddProperty(new PropertyDeclaration("Name", new TypeExpression("string")));

// Generate the C# code
using var writer = new StringWriter();
classDecl.Generate(writer);

Dependencies

  • Albatross.CodeGen (project reference)
  • Albatross.Collections 8.0.1

Source Code

Albatross.CodeGen.CSharp

NuGet Package

NuGet Version

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 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. 
.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 was computed.  net481 was computed. 
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

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
9.0.2-200.main 25 1/30/2026
9.0.1 107 1/9/2026
9.0.1-190.main 35 1/8/2026
9.0.1-185.main 40 1/4/2026
9.0.1-168.main 44 12/31/2025
9.0.1-165.main 31 12/31/2025
9.0.1-164.main 48 12/25/2025
9.0.1-154.main 34 12/24/2025
9.0.1-148.main 39 12/22/2025
9.0.1-60.main 57 11/21/2025
9.0.1-55.main 62 11/19/2025
9.0.0-50.main 56 11/11/2025
8.0.2 83 5/26/2025
8.0.1 77 3/19/2025
1.1.6 1,794 2/11/2018