Skip to main content
ThisAssembly.Constants package icon

ThisAssembly.Constants

This package generates a static `ThisAssembly.Constants` class with public constants for each Constant MSBuild item in the project. For example: <ItemGroup> <Constant Include="Foo.Bar" Value="Baz" /> </ItemGroup> Results in a corresponding `ThisAssembly.Constants.Foo.Bar` constant with the value `Baz`: Generated code: C#: partial class ThisAssembly { public static partial class Constants { public static partial class Foo { public const string Bar = "Baz"; } } } > This project uses SponsorLink to attribute sponsor status (direct, indirect or implicit). For IDE usage, sponsor status is required. > IDE-only warnings will be emitted after a grace period otherwise. Learn more at https://github.com/devlooped#sponsorlink.

Total Downloads
3.6M
3,596,934
Published
Apr 24, 2025
Latest stable version

Install

.NET CLI
dotnet add package ThisAssembly.Constants --version 2.0.13
Package Manager Console
Install-Package ThisAssembly.Constants -Version 2.0.13
PackageReference
<PackageReference Include="ThisAssembly.Constants" Version="2.0.13" />

Frameworks

.NETStandard2.0

Dependencies

Microsoft.CSharp
.NETStandard2.0
[4.7.0, )
[4.5.4, )

Adoption guide

A verified publisher signal is available. Assess fit from the package's supported frameworks, license and dependency graph rather than popularity alone.

Compatibility metadata lists 1 target framework; confirm the exact target used by your application.

How to read this guidance

Sources: published NuGet v3 registry metadata and explicit NuBrowse editorial guides. Refresh: package metadata is refreshed from NuGet when the page loads. Limit: this is not a security, legal or compatibility guarantee; validate the selected version in your project.

Useful next steps

Move from package metadata to a concrete selection or review workflow.