ConstExpr 0.1.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package ConstExpr --version 0.1.0
                    
NuGet\Install-Package ConstExpr -Version 0.1.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="ConstExpr" Version="0.1.0">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ConstExpr" Version="0.1.0" />
                    
Directory.Packages.props
<PackageReference Include="ConstExpr">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
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 ConstExpr --version 0.1.0
                    
#r "nuget: ConstExpr, 0.1.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 ConstExpr@0.1.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=ConstExpr&version=0.1.0
                    
Install as a Cake Addin
#tool nuget:?package=ConstExpr&version=0.1.0
                    
Install as a Cake Tool

ConstExpr

A C# analyser and source generator library targeting .NET Standard 2.0.

The initial project contains an empty IIncrementalGenerator.Initialize entry point. It does not generate source or report diagnostics yet.

Structure

src/ConstExpr/External contains public entry points in ConstExpr.External. Internal implementation belongs in src/ConstExpr/Internal, under ConstExpr.Internal. ArchonAnalysers enforces namespace accessibility through .archonanalysers.

The generator uses Roslyn 5.0 and requires a compatible compiler host, such as the .NET 10 SDK. Its assembly targets netstandard2.0 and is packaged under analyzers/dotnet/cs, with no runtime library or Roslyn package dependencies.

Build and check the package

dotnet restore src/ConstExpr.slnx
dotnet build src/ConstExpr.slnx -c Release --no-restore
dotnet format src/ConstExpr.slnx --verify-no-changes --no-restore
dotnet pack src/ConstExpr.slnx -c Release --no-build --no-restore -o artifacts/packages
bash .github/scripts/check-package.sh 0.1.0

The package check validates the NuGet layout and builds a consumer that loads the packaged generator.

Releases

CI builds, checks formatting, and validates the NuGet package on pull requests. CD runs on changes to main, calculates a version from conventional commits, and publishes to NuGet.org and GitHub Packages before creating a GitHub release. v0.0.0 marks the initial repository commit for version calculation. CD also supports manual dispatch.

NuGet publishing uses NuGet/login@v1 with OIDC. The repository variable NUGET_USER is hughesjs. Publishing requires a NuGet trusted publishing policy with these values:

Field Value
Repository owner ScottishTapWater
Repository ConstExpr
Workflow file cd.yml
Environment Leave empty
Package scope ConstExpr, including new packages

The publishing step will fail until that policy exists.

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

This package has 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
0.4.0 100 11/16/2026
0.3.0 100 11/16/2026
0.2.0 96 11/15/2026
0.1.0 107 11/14/2026