Skip to main content
ThisAssembly.Constants package icon

ThisAssembly.Constants

** C# 9.0+ ONLY ** 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"; } } }

Total Downloads
3.9M
3,854,041
Published
Dec 31, 2022
Latest stable version

Install

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

Frameworks

.NETStandard2.0

Dependencies

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

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.