feat: Replaces Crestron.SimplSharp.Reflection with System.Reflextion and updates the way essentials plugin versions are stored and retrieved

This commit is contained in:
Neil Dorin
2024-05-23 14:11:42 -06:00
parent 621d848418
commit 0a2aaa693f
24 changed files with 100 additions and 89 deletions

View File

@@ -1,7 +1,7 @@
using Crestron.SimplSharp;
using Crestron.SimplSharp.CrestronIO;
using Crestron.SimplSharp.Reflection;
using System.Reflection;
using Crestron.SimplSharpPro;
using Crestron.SimplSharpPro.CrestronThread;
using Crestron.SimplSharpPro.Diagnostics;
@@ -172,11 +172,7 @@ namespace PepperDash.Essentials
directoryPrefix = Directory.GetApplicationRootDirectory();
var fullVersion = Assembly.GetExecutingAssembly().GetName().Version.ToString();
Global.SetAssemblyVersion(fullVersion);
//Global.SetAssemblyVersion(fullVersionAtt.InformationalVersion);
Global.SetAssemblyVersion(PluginLoader.GetAssemblyVersion(Assembly.GetExecutingAssembly()));
if (CrestronEnvironment.DevicePlatform != eDevicePlatform.Server) // Handles 3-series running Windows CE OS
{

View File

@@ -61,7 +61,7 @@
"supportedSystemTypes": [
"hudType",
"presType",
"vtcType",
"vtType",
"custom"
],
"type": "rmc3",

View File

@@ -6,7 +6,7 @@ using System.Linq;
using Crestron.SimplSharp;
using Crestron.SimplSharp.CrestronIO;
using Crestron.SimplSharpPro;
using Crestron.SimplSharp.Reflection;
using System.Reflection;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
@@ -35,7 +35,7 @@ namespace PepperDash.Essentials
{
try
{
var factory = (IDeviceFactory)Crestron.SimplSharp.Reflection.Activator.CreateInstance(type);
var factory = (IDeviceFactory)Activator.CreateInstance(type);
factory.LoadTypeFactories();
}
catch (Exception e)

View File

@@ -11,7 +11,9 @@
<OutputPath>bin\$(Configuration)\</OutputPath>
<Title>PepperDash Essentials</Title>
<PackageId>PepperDashEssentials</PackageId>
<AssemblyInformationalVersion>$(Version)</AssemblyInformationalVersion>
<Version>2.0.0-local</Version>
<InformationalVersion>$(Version)</InformationalVersion>
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugType>full</DebugType>
@@ -47,7 +49,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Crestron.SimplSharp.SDK.Program" Version="2.20.42" />
<PackageReference Include="PepperDashCore" Version="2.0.0-alpha-419" />
<PackageReference Include="PepperDashCore" Version="2.0.0-alpha-420" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\PepperDash.Essentials.Core\PepperDash.Essentials.Core.csproj" />