Skip to content

Latest commit

 

History

History
29 lines (25 loc) · 985 Bytes

Gen-Metadata.md

File metadata and controls

29 lines (25 loc) · 985 Bytes

自动创建程序集Metadata信息

生成的Metadata信息包括:

// <auto-generated/>
namespace Biwen.AutoClassGen.TestConsole.Generated;
[global::System.CodeDom.Compiler.GeneratedCode("Biwen.AutoClassGen", "1.3.9.6")]
public static class AssemblyMetadata
{
    public const string TargetFramework = ".NETCoreApp,Version=v8.0";
    public const string Company = "Inc";
    public const string Configuration = "Debug";
    public const string Copyright = "MIT";
    public const string Description = "This is a test console App";
    public const string FileVersion = "2.0.2";
    public const string InformationalVersion = "2.0.1+3cba19993d7e9823630985a6af36b49a0e015e61";
    public const string Product = "Test Console App";
    public const string Title = "Biwen.AutoClassGen.TestConsole";
    public const string Version = "2.0.1.0";
}

使用方式:

Console.WriteLine({namespace}.Generated.AssemblyMetadata.TargetFramework);
//...