AssemblyVersionInfo is a very simple source generator that generates constant strings of your assembly name and version. The intended usage is for the System.CodeDom.Compiler.GeneratedCodeAttribute.
$ dotnet add package AssemblyVersionInfoAssemblyVersionInfo is a very simple source generator that generates constant strings of your assembly name and version.
The intended usage is for the GeneratedCodeAttribute.
All it does is generating a the static class Assembly in the namespace AssemblyVersionInfo:
// <auto-generated/>
namespace AssemblyVersionInfo;
internal static class Assembly {
public const string NAME = "{{compilation.name}}";
public const string VERSION_MAJOR = "{{compilation.version.Major}}";
public const string VERSION_MINOR = "{{compilation.version.Minor}}";
public const string VERSION_BUILD = "{{compilation.version.Build}}";
public const string VERSION_REVISION = "{{compilation.version.Revision}}";
public const string VERSION = "{{compilation.version}}";
public const string VERSION_MAJOR_MINOR = "{{compilation.version.Major}}.{{compilation.version.Minor}}";
public const string VERSION_MAJOR_MINOR_BUILD = "{{compilation.version.Major}}.{{compilation.version.Minor}}.{{compilation.version.Build}}";
}
For documentation or sourcecode see github.com/BlackWhiteYoshi/AssemblyVersionInfo.