From 2138a29b3169d22ec3e4957a1c24cc231cbd6cbd Mon Sep 17 00:00:00 2001 From: jtalborough Date: Tue, 25 Feb 2025 19:17:34 -0500 Subject: [PATCH] fix: update target frameworks and package references; change culture to InvariantCulture --- src/PepperDash.Essentials.Core/Global/Global.cs | 3 ++- .../PepperDash.Essentials.Core.csproj | 4 ++-- .../PepperDash.Essentials.Devices.Common.csproj | 4 ++-- src/PepperDash.Essentials/ControlSystem.cs | 12 ++++++++---- .../PepperDash.Essentials.csproj | 8 ++++---- 5 files changed, 18 insertions(+), 13 deletions(-) diff --git a/src/PepperDash.Essentials.Core/Global/Global.cs b/src/PepperDash.Essentials.Core/Global/Global.cs index 9e4b6462..c34fb616 100644 --- a/src/PepperDash.Essentials.Core/Global/Global.cs +++ b/src/PepperDash.Essentials.Core/Global/Global.cs @@ -35,7 +35,8 @@ namespace PepperDash.Essentials.Core public static eCrestronSeries ProcessorSeries { get { return CrestronEnvironment.ProgramCompatibility; } } // TODO: consider making this configurable later - public static IFormatProvider Culture = CultureInfo.CreateSpecificCulture("en-US"); + public static IFormatProvider Culture = CultureInfo.InvariantCulture; + /// /// True when the processor type is a DMPS variant diff --git a/src/PepperDash.Essentials.Core/PepperDash.Essentials.Core.csproj b/src/PepperDash.Essentials.Core/PepperDash.Essentials.Core.csproj index cd6da599..97667dea 100644 --- a/src/PepperDash.Essentials.Core/PepperDash.Essentials.Core.csproj +++ b/src/PepperDash.Essentials.Core/PepperDash.Essentials.Core.csproj @@ -4,7 +4,7 @@ Debug;Release;Debug 4.7.2 - net472;net6 + net6;net8 true bin\$(Configuration)\ PepperDash_Essentials_Core @@ -26,7 +26,7 @@ - + diff --git a/src/PepperDash.Essentials.Devices.Common/PepperDash.Essentials.Devices.Common.csproj b/src/PepperDash.Essentials.Devices.Common/PepperDash.Essentials.Devices.Common.csproj index e1ccc8b0..5a711bd3 100644 --- a/src/PepperDash.Essentials.Devices.Common/PepperDash.Essentials.Devices.Common.csproj +++ b/src/PepperDash.Essentials.Devices.Common/PepperDash.Essentials.Devices.Common.csproj @@ -4,7 +4,7 @@ Debug;Release;Debug 4.7.2 - net472;net6 + net6;net8 true bin\$(Configuration)\ Essentials Devices Common @@ -30,6 +30,6 @@ - + \ No newline at end of file diff --git a/src/PepperDash.Essentials/ControlSystem.cs b/src/PepperDash.Essentials/ControlSystem.cs index 5d07cf5f..d93d9a89 100644 --- a/src/PepperDash.Essentials/ControlSystem.cs +++ b/src/PepperDash.Essentials/ControlSystem.cs @@ -1,5 +1,4 @@ - -using Crestron.SimplSharp; +using Crestron.SimplSharp; using Crestron.SimplSharp.CrestronIO; using System.Reflection; using Crestron.SimplSharpPro; @@ -28,7 +27,9 @@ namespace PepperDash.Essentials public ControlSystem() : base() + { + Thread.MaxNumberOfUserThreads = 400; Global.ControlSystem = this; DeviceManager.Initialize(this); @@ -36,7 +37,7 @@ namespace PepperDash.Essentials SystemMonitor.ProgramInitialization.ProgramInitializationUnderUserControl = true; Debug.SetErrorLogMinimumDebugLevel(CrestronEnvironment.DevicePlatform == eDevicePlatform.Appliance ? LogEventLevel.Warning : LogEventLevel.Verbose); - + // AppDomain.CurrentDomain.AssemblyResolve += CurrentDomainOnAssemblyResolve; } @@ -96,6 +97,9 @@ namespace PepperDash.Essentials DeterminePlatform(); + // Print .NET runtime version + Debug.LogMessage(LogEventLevel.Information, "Running on .NET runtime version: {0}", System.Runtime.InteropServices.RuntimeInformation.FrameworkDescription); + if (Debug.DoNotLoadConfigOnNextBoot) { CrestronConsole.AddNewConsoleCommand(s => CrestronInvoke.BeginInvoke((o) => GoWithLoad()), "go", "Loads configuration file", @@ -144,7 +148,7 @@ namespace PepperDash.Essentials CrestronConsole.AddNewConsoleCommand(DeviceManager.GetRoutingPorts, "getroutingports", "Reports all routing ports, if any. Requires a device key", ConsoleAccessLevelEnum.AccessOperator); - DeviceManager.AddDevice(new EssentialsWebApi("essentialsWebApi", "Essentials Web API")); + //DeviceManager.AddDevice(new EssentialsWebApi("essentialsWebApi", "Essentials Web API")); if (!Debug.DoNotLoadConfigOnNextBoot) { diff --git a/src/PepperDash.Essentials/PepperDash.Essentials.csproj b/src/PepperDash.Essentials/PepperDash.Essentials.csproj index d88a4abf..aa521fda 100644 --- a/src/PepperDash.Essentials/PepperDash.Essentials.csproj +++ b/src/PepperDash.Essentials/PepperDash.Essentials.csproj @@ -6,9 +6,9 @@ PepperDash.Essentials PepperDashEssentials - net472;net6 + net6;net8 true - bin\$(Configuration)\ + $(ProjectDir)bin\$(Configuration)\ PepperDash Essentials PepperDashEssentials 2.0.0-local @@ -48,8 +48,8 @@ - - + +