fix: update debug settings path handling for improved directory structure and support for multiple target frameworks

This commit is contained in:
jtalborough
2025-02-25 18:53:40 -05:00
parent c314b0e745
commit f248ef8579
2 changed files with 8 additions and 4 deletions

View File

@@ -823,11 +823,15 @@ namespace PepperDash.Core
{
if (CrestronEnvironment.DevicePlatform == eDevicePlatform.Appliance)
{
// CheckForMigration();
return string.Format(@"\user\debugSettings\program{0}", InitialParametersClass.ApplicationNumber);
// Use fully qualified name for System.IO.Path
string baseDir = Directory.GetApplicationRootDirectory();
string userDir = System.IO.Path.Combine(baseDir, "user");
string debugSettingsDir = System.IO.Path.Combine(userDir, "debugSettings");
return System.IO.Path.Combine(debugSettingsDir, $"program{InitialParametersClass.ApplicationNumber}");
}
return string.Format("{0}{1}user{1}debugSettings{1}{2}.json",Directory.GetApplicationRootDirectory(), Path.DirectorySeparatorChar, InitialParametersClass.RoomId);
return string.Format("{0}{1}user{1}debugSettings{1}{2}.json",
Directory.GetApplicationRootDirectory(), Path.DirectorySeparatorChar, InitialParametersClass.RoomId);
}
private static void CheckForMigration()

View File

@@ -2,7 +2,7 @@
<PropertyGroup>
<RootNamespace>PepperDash.Core</RootNamespace>
<AssemblyName>PepperDashCore</AssemblyName>
<TargetFrameworks>net8</TargetFrameworks>
<TargetFrameworks>net6;net8</TargetFrameworks>
<Deterministic>true</Deterministic>
<NeutralLanguage>en</NeutralLanguage>
<OutputPath>bin\$(Configuration)\</OutputPath>