Log precise version of lib

This commit is contained in:
Wizou 2021-11-04 03:10:03 +01:00
parent ec6fb6c0c0
commit 4418f562cb
2 changed files with 9 additions and 1 deletions

7
.github/release.yml vendored
View file

@ -14,6 +14,13 @@ stages:
jobs:
- job: publish
steps:
- task: UseDotNet@2
displayName: 'Use .NET Core sdk'
inputs:
packageType: 'sdk'
version: '6.0.x'
includePreviewVersions: true
- task: DotNetCoreCLI@2
inputs:
command: 'pack'

View file

@ -74,7 +74,8 @@ namespace WTelegram
if (_session.MainDC != 0) _session.DCSessions.TryGetValue(_session.MainDC, out _dcSession);
_dcSession ??= new() { Id = Helpers.RandomLong() };
_dcSession.Client = this;
Helpers.Log(1, $"WTelegramClient {Assembly.GetExecutingAssembly().GetName().Version} running under {System.Runtime.InteropServices.RuntimeInformation.FrameworkDescription}");
var version = Assembly.GetExecutingAssembly().GetCustomAttribute<AssemblyInformationalVersionAttribute>().InformationalVersion;
Helpers.Log(1, $"WTelegramClient {version[..version.IndexOf('+')]} running under {System.Runtime.InteropServices.RuntimeInformation.FrameworkDescription}");
}
private Client(Client cloneOf, Session.DCSession dcSession)