MQTTnet.Server: Fix version detection.

This commit is contained in:
Christian Kratky
2020-04-16 12:48:26 +02:00
parent 4b08bb41f5
commit 2d6c44e45b
3 changed files with 9 additions and 3 deletions
+5 -1
View File
@@ -2,6 +2,7 @@
using Microsoft.Extensions.Hosting;
using MQTTnet.Server.Web;
using System;
using System.Diagnostics;
using System.Reflection;
namespace MQTTnet.Server
@@ -58,8 +59,11 @@ namespace MQTTnet.Server
Console.WriteLine(@"https://github.com/chkr1011/MQTTnet");
Console.ForegroundColor = ConsoleColor.White;
var fileVersion = FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location);
Console.WriteLine($@"
Version: {Assembly.GetExecutingAssembly().GetCustomAttribute<AssemblyInformationalVersionAttribute>().InformationalVersion}
Version: {fileVersion.ProductVersion}
License: MIT (read LICENSE file)
Sponsoring: https://opencollective.com/mqttnet
Support: https://github.com/chkr1011/MQTTnet/issues