-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCommonAssemblyInfo.cs
33 lines (27 loc) · 1.03 KB
/
CommonAssemblyInfo.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
using System;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
[assembly: AssemblyCompany("d3 Inc.")]
[assembly: AssemblyCopyright("Copyright yoq/mcb © 2022")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
[assembly: AssemblyVersion("0.6.4")]
public static class VersionHelper
{
public static string GetVersion()
{
Assembly asm = Assembly.GetExecutingAssembly();
Version vers = asm.GetName().Version;
string versionString = vers.Major + "." + vers.Minor + "." + vers.Build;
string confStr = (asm.GetCustomAttributes(typeof(AssemblyConfigurationAttribute), false)[0] as AssemblyConfigurationAttribute).Configuration;
return versionString + (confStr == "" ? "" : " " + confStr);
}
}