ThisAssembly.Constants 1.0.9
** 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";
}
}
}
Built from https://github.com/devlooped/ThisAssembly/tree/96dde2c67
Showing the top 20 packages that depend on ThisAssembly.Constants.
| Packages | Downloads |
|---|---|
|
ThisAssembly
Meta-package that includes all ThisAssembly.* packages.
|
4 |
|
ThisAssembly.Metadata
This package generates a static `ThisAssembly.Metadata` class with public
constants exposing each `[System.Reflection.AssemblyMetadata(..)]` defined for the project,
such as when using .NET 5.0+ support for `AssemblyMetadata` MSBuild items.
So for an attribute like:
[assembly: System.Reflection.AssemblyMetadataAttribute("Foo", "Bar")]
A corresponding `ThisAssembly.Metadata.Foo` constant with the value `Bar` is provided.
The metadata attribute can alternatively be declared using MSBuild in the project
(for .NET 5.0+ projects):
<ItemGroup>
<AssemblyMetadata Include="Foo" Value="Bar" />
</ItemGroup>
Generated code:
C#:
partial class ThisAssembly
{
public static partial class Metadata
{
public const string Foo = "Bar";
}
}
> 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.
|
4 |
|
ThisAssembly.Git
This package generates a static `ThisAssembly.Git` class with public constants for the following properties provided by Microsoft.SourceLink (git-based) packages:
* Commit * Sha (first 9 chars from Commit) * Root (normalized to forward slashes) * Url (if PublishRepositoryUrl=true)
It also provides the Branch property, calculated from supported CI environment variables (GitHub Actions, Azure DevOps, AppVeyor, TeamCity, Travis CI, Circle CI, GitLab CI, Buddy, and Jenkins).
|
4 |
|
ThisAssembly.Git
This package generates a static `ThisAssembly.Git` class with public
constants for the following properties provided by Microsoft.SourceLink (git-based) packages:
* Commit
* Sha (first 9 chars from Commit)
* Root (normalized to forward slashes)
* Url (if PublishRepositoryUrl=true)
It also provides the Branch property, calculated from supported CI
environment variables (GitHub Actions, Azure DevOps, AppVeyor, TeamCity,
Travis CI, Circle CI, GitLab CI, Buddy, and Jenkins).
> 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.
|
4 |
|
ThisAssembly.AssemblyInfo
This package generates a static `ThisAssembly.Info` class with public constants exposing the following attribute values generated by default for SDK style projects:
* AssemblyConfigurationAttribute * AssemblyCompanyAttribute * AssemblyTitleAttribute * AssemblyProductAttribute
* AssemblyVersionAttribute * AssemblyInformationalVersionAttribute * AssemblyFileVersionAttribute
If your project includes these attributes by other means, they will still be emitted properly on the `ThisAssembly.Info` class.
|
4 |
|
ThisAssembly.AssemblyInfo
This package generates a static `ThisAssembly.Info` class with public
constants exposing the following attribute values generated by default for SDK style projects:
* AssemblyConfigurationAttribute
* AssemblyCompanyAttribute
* AssemblyTitleAttribute
* AssemblyProductAttribute
* AssemblyVersionAttribute
* AssemblyInformationalVersionAttribute
* AssemblyFileVersionAttribute
If your project includes these attributes by other means, they will still be emitted properly
on the `ThisAssembly.Info` class.
> 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.
|
4 |
.NET Standard 2.0
- Microsoft.CSharp (>= 4.5.0)
- System.Threading.Tasks.Extensions (>= 4.5.4)
- ThisAssembly.Prerequisites (>= 1.0.9)
| Version | Downloads | Last updated |
|---|---|---|
| 2.1.2 | 2 | 06/16/2026 |
| 2.1.1 | 3 | 06/16/2026 |
| 2.1.0 | 3 | 06/16/2026 |
| 2.1.0-rc.1 | 3 | 06/16/2026 |
| 2.1.0-rc | 3 | 06/16/2026 |
| 2.1.0-beta | 3 | 06/16/2026 |
| 2.0.14 | 3 | 06/16/2026 |
| 2.0.13 | 3 | 06/16/2026 |
| 2.0.12 | 3 | 06/16/2026 |
| 2.0.11 | 3 | 06/16/2026 |
| 2.0.10 | 3 | 06/16/2026 |
| 2.0.9 | 3 | 06/16/2026 |
| 2.0.8 | 3 | 06/16/2026 |
| 2.0.7 | 3 | 06/16/2026 |
| 2.0.6 | 3 | 06/16/2026 |
| 2.0.5 | 3 | 06/16/2026 |
| 2.0.4 | 3 | 06/16/2026 |
| 2.0.3 | 3 | 06/16/2026 |
| 2.0.2 | 3 | 06/16/2026 |
| 1.4.3 | 3 | 06/16/2026 |
| 1.4.2 | 3 | 06/16/2026 |
| 1.4.1 | 3 | 06/16/2026 |
| 1.4.0 | 3 | 06/16/2026 |
| 1.1.3 | 3 | 06/16/2026 |
| 1.1.2 | 3 | 06/16/2026 |
| 1.1.1 | 3 | 06/16/2026 |
| 1.1.1-beta | 3 | 06/16/2026 |
| 1.1.0 | 3 | 06/16/2026 |
| 1.0.10 | 4 | 06/16/2026 |
| 1.0.9 | 3 | 06/16/2026 |
| 1.0.8 | 3 | 06/16/2026 |
| 1.0.7 | 3 | 06/16/2026 |
| 1.0.6 | 3 | 06/16/2026 |
| 1.0.5 | 3 | 06/16/2026 |
| 1.0.4 | 3 | 06/16/2026 |
| 1.0.3 | 4 | 06/16/2026 |
| 1.0.2 | 4 | 06/16/2026 |
| 1.0.1 | 4 | 06/16/2026 |
| 1.0.0 | 4 | 06/16/2026 |
| 1.0.0-rc.1 | 4 | 06/16/2026 |
| 1.0.0-rc | 4 | 06/16/2026 |