dotnet-installer/src/Microsoft.DotNet.Cli.Utils/Product.cs

20 lines
557 B
C#
Raw Normal View History

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