Skip to main content

AssemblyMetadata.Generators by LoreSoft

NuGet / site data

Nuget GitHub last commit GitHub Repo stars

Details

Info

info

Name: AssemblyMetadata.Generators

Source generator to expose assembly attributes as string constants

Author: LoreSoft

NuGet: https://www.nuget.org/packages/AssemblyMetadata.Generators/

You can find more details at https://github.com/loresoft/AssemblyMetadata.Generators

Source: https://github.com/loresoft/AssemblyMetadata.Generators

Author

note

LoreSoft Alt text

Original Readme

note

AssemblyMetadata.Generators

Source generator to expose assembly attributes as string constants.

Build status

NuGet Version

Coverage Status

######### Usage

########## Add package

Add the nuget package project to your projects.

dotnet add package AssemblyMetadata.Generators

######### Generated

This source generator creates an internal partial class called ThisAssembly with all the assembly level attributes converted to string constants

internal static partial class ThisAssembly
{
public const string TargetFramework = ".NETCoreApp,Version=v7.0";
public const string Company = "LoreSoft";
public const string Configuration = "Debug";
public const string Copyright = "Copyright © 2023 LoreSoft";
public const string Description = "Source generator to expose assembly attributes as string constants";
public const string FileVersion = "1.0.0.0";
public const string InformationalVersion = "1.0.0";
public const string Product = "AssemblyMetadata.Generators.Tests";
public const string Title = "AssemblyMetadata.Generators.Tests";
public const string Version = "1.0.0.0";
public const string RepositoryUrl = "https://github.com/loresoft/AssemblyMetadata.Generators";
public const string NeutralResourcesLanguage = "en-US";
}

######### Namespace

Set the ThisAssemblyNamespace MSBuild property to set the namespace of the generated ThisAssembly class. Otherwise, it will be in the global namespace.

Put ThisAssembly in the projects root namespace.

<PropertyGroup>
<ThisAssemblyNamespace>$(RootNamespace)</ThisAssemblyNamespace>
</PropertyGroup>

About

note

Generating assembly metadata attributes at compile time.

How to use

Example (source csproj, source files)

This is the CSharp Project that references AssemblyMetadata.Generators

<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="AssemblyMetadata.Generators" Version="2.2.0" OutputItemType="Analyzer"
ReferenceOutputAssembly="false" />
</ItemGroup>
<PropertyGroup>
<EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles>
<CompilerGeneratedFilesOutputPath>$(BaseIntermediateOutputPath)\GX</CompilerGeneratedFilesOutputPath>
</PropertyGroup>
</Project>

Generated Files

Those are taken from $(BaseIntermediateOutputPath)\GX

// <auto-generated />

/// <summary>
/// Assembly attributes exposed as public constants
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("AssemblyMetadata.Generators", "2.2.0+ec398d1ec2fd415d5475a08ad0fada879c510c97")]
internal static partial class ThisAssembly
{

public const string TargetFramework = ".NETCoreApp,Version=v10.0";

public const string Company = "DemoMeta";

public const string Configuration = "Debug";

public const string FileVersion = "1.0.0.0";

public const string InformationalVersion = "1.0.0+3eed64e7dd376ed8c6cf1f77efd5968cb88c898a";

public const string Product = "DemoMeta";

public const string Title = "DemoMeta";

public const string Version = "1.0.0.0";

public const string AssemblyName = "DemoMeta";

public const string DefineConstants = "TRACE";

public const string RootNamespace = "DemoMeta";

public const string PackageVersion = "1.0.0";

public const string PackageId = "DemoMeta";

}

Useful

Download Example (.NET C#)

Share AssemblyMetadata.Generators

https://ignatandrei.github.io/RSCG_Examples/v2/docs/AssemblyMetadata.Generators

Category "EnhancementProject" has the following generators:

1 AssemblyMetadata Nuget GitHub Repo stars 2026-04-02

2 AssemblyMetadata.Generators Nuget GitHub Repo stars 2026-05-15

3 AssemblyVersionInfo Nuget GitHub Repo stars 2025-07-28

4 AutoInvoke.Generator Nuget GitHub Repo stars 2024-03-03

5 AutoSpectre NugetNuget GitHub Repo stars 2024-02-24

6 BuildInfo Nuget GitHub Repo stars 2024-01-20

7 Credfeto.Version.Information.Generator Nuget GitHub Repo stars 2024-11-05

8 Larcanum.GitInfo Nuget GitHub Repo stars 2025-01-17

9 LinqGen.Generator NugetNuget GitHub Repo stars 2024-03-04

10 Pekspro.BuildInformationGenerator Nuget GitHub Repo stars 2024-07-19

11 PlantUmlClassDiagramGenerator NugetNuget GitHub Repo stars 2024-02-20

12 RSCG_AMS Nuget GitHub Repo stars 2023-04-16

13 RSCG_ExportDiagram Nuget GitHub Repo stars 2024-08-01

14 RSCG_FunctionsWithDI Nuget GitHub Repo stars 2023-04-16

15 RSCG_NameGenerator Nuget GitHub Repo stars 2024-08-25

16 RSCG_TimeBombComment Nuget GitHub Repo stars 2023-04-16

17 RSCG_Wait Nuget GitHub Repo stars 2024-02-21

18 ShadowWriterProjectInfo Nuget GitHub Repo stars 2025-07-27

19 ThisAssembly Nuget GitHub Repo stars 2023-04-16

20 ThisAssembly.Constants Nuget GitHub Repo stars 2024-07-18

21 ThisAssembly.Metadata Nuget GitHub Repo stars 2024-07-20

See category

EnhancementProject