From e6fb9cd1ebb54bc5c808c2c06fe63e299a372f9b Mon Sep 17 00:00:00 2001 From: Neil Dorin Date: Tue, 24 Mar 2020 16:20:42 -0600 Subject: [PATCH] moving to updated informational version and setting up to unzip plugin cplz files into a folder one at a time before loading --- PepperDashEssentials/ControlSystem.cs | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/PepperDashEssentials/ControlSystem.cs b/PepperDashEssentials/ControlSystem.cs index ffc192e4..a9b16686 100644 --- a/PepperDashEssentials/ControlSystem.cs +++ b/PepperDashEssentials/ControlSystem.cs @@ -235,11 +235,19 @@ namespace PepperDash.Essentials { try { + string assyVersion = string.Empty; var assy = Assembly.LoadFrom(fi.FullName); - var ver = assy.GetName().Version; - var verStr = string.Format("{0}.{1}.{2}.{3}", ver.Major, ver.Minor, ver.Build, ver.Revision); + var ver = assy.GetCustomAttributes(typeof(AssemblyInformationalVersionAttribute), false); + if (ver != null) + { + AssemblyInformationalVersionAttribute verAttribute = ver[0] as AssemblyInformationalVersionAttribute; + assyVersion = verAttribute.InformationalVersion; + } + else + + assyList.Add(fi.FullName, assy); - Debug.Console(0, Debug.ErrorLogLevel.Notice, "Loaded plugin file '{0}', version {1}", fi.FullName, verStr); + Debug.Console(0, Debug.ErrorLogLevel.Notice, "Loaded plugin file '{0}', version {1}", fi.FullName, assyVersion); } catch {