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

23 lines
732 B
C#
Raw Normal View History

// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
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;
}
}
}