Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/credfeto/credfeto-version-constants-generator

Simple version information constants generator
https://github.com/credfeto/credfeto-version-constants-generator

code-generation code-generator dotnet generator optimization performance

Last synced: 19 days ago
JSON representation

Simple version information constants generator

Awesome Lists containing this project

README

        

# credfeto-version-constants-generator

Source generator for embedding build information as compile time constants in C# projects.

## Usage

Add the following to your project file:

```xml

```

This generates a class called `VersionInformation` in the root namespace of the project with the following properties
taken from properties in the project file:

```csharp
internal static class VersionInformation
{
public const string Version = "0.0.0.1-test";
public const string Product = "Credfeto.Version.Information.Example.Tests";
public const string Company = "Example Company";
public const string Copyright = "Copyright © Example Company 2024";
}
```

Controlled by the following properties:

```xml

Example Company
Copyright © Example Company 2024

```

* Version comes from the ``AssemblyInformationalVersion`` that can be set using the ``/p:Version=0.0.1-test`` command
line argument to MSBuild. or a ```` property in the project file.
* Product comes from the Root Namespace property for the assembly.

## Build Status

| Branch | Status |
|---------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| main | [![Build: Pre-Release](https://github.com/credfeto/credfeto-versioninfo/actions/workflows/build-and-publish-pre-release.yml/badge.svg)](https://github.com/credfeto/credfeto-versioninfo/actions/workflows/build-and-publish-pre-release.yml) |
| release | [![Build: Release](https://github.com/credfeto/credfeto-versioninfo/actions/workflows/build-and-publish-release.yml/badge.svg)](https://github.com/credfeto/credfeto-versioninfo/actions/workflows/build-and-publish-release.yml) |

## Changelog

View [changelog](CHANGELOG.md)

## Contributors