Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/credfeto/credfeto-version-constants-generator
- Owner: credfeto
- License: mit
- Created: 2024-10-16T12:23:46.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2024-10-25T14:33:14.000Z (23 days ago)
- Last Synced: 2024-10-25T15:38:06.344Z (23 days ago)
- Topics: code-generation, code-generator, dotnet, generator, optimization, performance
- Language: C#
- Homepage:
- Size: 174 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Codeowners: .github/CODEOWNERS
- Security: SECURITY.md
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