SkillAgentSearch skills...

GitBuildInfo.SourceGenerator

Source Generator for dumping the git branch information, commit hash, and if the working tree is dirty or clean on projects that install this and applies them as an assembly level attribute.

Install / Use

/learn @Elskom/GitBuildInfo.SourceGenerator
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

GitBuildInfo.SourceGenerator

Source Generator for dumping the git branch information, commit hash, and if the working tree is dirty or clean on projects that install this and applies them as an assembly level attribute.

Codacy Badge Codacy Coverage Badge

| Package | Version | |:-------:|:-------:| | GitBuildInfo.SourceGenerator | NuGet Badge |

Usage

  1. Install this package into your project with:
<PackageReference Include="GitBuildInfo.SourceGenerator" IsImplicitlyDefined="true" Version="*-*">
  <PrivateAssets>all</PrivateAssets>
</PackageReference>
  1. Set the following msbuild properties in your project (or if you have all project file property settings stored in a project specific Directory.Build.props) file:
  • <GitBuildInfoIsGeneric></GitBuildInfoIsGeneric> (Optional, default is false)
  • <GitBuildInfoAssemblyType></GitBuildInfoAssemblyType> (Required, Note: Do not include anything before the type name like a fully qualified namespace or any .'s. For that you need to set RootNamespace below)
  • <RootNamespace></RootNamespace> (Required unless you want the type to be assumed to be in the Elskom.Generic.Libs namespace by the generator)
  1. The generator package should now run a build task to grab information prior to it executing the generator.
View on GitHub
GitHub Stars41
CategoryDevelopment
Updated3mo ago
Forks1

Languages

C#

Security Score

92/100

Audited on Dec 30, 2025

No findings