2016-03-25 20:15:36 +00:00
|
|
|
using System.Reflection;
|
|
|
|
|
|
|
|
namespace Microsoft.DotNet.Cli.Utils
|
|
|
|
{
|
|
|
|
public class Product
|
|
|
|
{
|
2016-12-17 06:41:06 +00:00
|
|
|
public static readonly string LongName = LocalizableStrings.DotNetCommandLineTools;
|
2016-03-25 20:15:36 +00:00
|
|
|
public static readonly string Version = GetProductVersion();
|
|
|
|
|
|
|
|
private static string GetProductVersion()
|
|
|
|
{
|
2016-12-17 06:41:06 +00:00
|
|
|
var attr = typeof(Product)
|
|
|
|
.GetTypeInfo()
|
|
|
|
.Assembly
|
|
|
|
.GetCustomAttribute<AssemblyInformationalVersionAttribute>();
|
2016-03-25 20:15:36 +00:00
|
|
|
return attr?.InformationalVersion;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|