BuildInfo 0.0.5
dotnet add package BuildInfo --version 0.0.5
NuGet\Install-Package BuildInfo -Version 0.0.5
<PackageReference Include="BuildInfo" Version="0.0.5"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
paket add BuildInfo --version 0.0.5
#r "nuget: BuildInfo, 0.0.5"
// Install BuildInfo as a Cake Addin #addin nuget:?package=BuildInfo&version=0.0.5 // Install BuildInfo as a Cake Tool #tool nuget:?package=BuildInfo&version=0.0.5
Build Info from C# and VB
Generates a C# or VB ThisAssembly class that contains static information about the build environment. Use it e.g. to construct your AssemblyVersion:
[assembly: AssemblyVersion ("1.0.0." + ThisAssembly.BuildEvn.BuildId)]
Currently available are:
ThisAssembly.BuildEnv.BuildId
: Set by the TFS/DevOps Build pipeline (see: https://docs.microsoft.com/en-us/azure/devops/pipelines/build/variables?view=azdevops)ThisAssembly.BuildEnv.BuildNumber
Set by the TFS/DevOps Build pipeline (see: https://docs.microsoft.com/en-us/azure/devops/pipelines/build/variables?view=azdevops)ThisAssembly.BuildEnv.BuildRepositoryClean
Set by the TFS/DevOps Build pipeline (see: https://docs.microsoft.com/en-us/azure/devops/pipelines/build/variables?view=azdevops)ThisAssembly.BuildEnv.Username
The username as set in the environment variables.
Available MSBuild customizations:
$(BuildInfoThisAssembly)
: set to 'false' to prevent assembly metadata and constants generation.$(BuildInfoAssemblyMetadata)
: set to 'false' to prevent assembly metadata generation only. Defaults to 'false'.$(BuildInfoAssemblyNamespace)
: allows overriding the namespace for the ThisAssembly class. Defaults to the global namespace.
This was inspired by GitInfo which uses the same generation process and can easly be used alongside BuildInfo (https://github.com/kzu/GitInfo).
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.