Fix publish warning and build restore

This commit is contained in:
2025-09-25 15:18:47 -04:00
parent 40f7dd0fa4
commit ce1fed6636
2 changed files with 3 additions and 4 deletions

View File

@@ -1,7 +1,6 @@
using FeedCenter.Properties;
using System;
using System.IO;
using System.Reflection;
namespace FeedCenter;
@@ -9,7 +8,7 @@ public static class SystemConfiguration
{
private static bool UseDebugPath => Environment.CommandLine.IndexOf("/debugPath", StringComparison.InvariantCultureIgnoreCase) != -1;
public static string DataDirectory => UseDebugPath ? Path.GetDirectoryName(Assembly.GetEntryAssembly().Location) : UserSettingsPath;
public static string DataDirectory => UseDebugPath ? Path.GetDirectoryName(AppContext.BaseDirectory) : UserSettingsPath;
public static string UserSettingsPath
{
@@ -17,7 +16,7 @@ public static class SystemConfiguration
{
// If we're running in debug mode then use a local path for the database and logs
if (UseDebugPath)
return Path.GetDirectoryName(Assembly.GetEntryAssembly().Location);
return Path.GetDirectoryName(AppContext.BaseDirectory);
// Get the path to the local application data directory
var path = Path.Combine(