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

View File

@@ -11,7 +11,7 @@ assembly_info:
assembly_version: "{version}" assembly_version: "{version}"
assembly_file_version: "{version}" assembly_file_version: "{version}"
before_build: before_build:
- ps: dotnet restore .\Application\ - ps: nuget restore
- ps: dotnet publish .\Application\ /p:PublishProfile=Properties\PublishProfiles\x64.pubxml - ps: dotnet publish .\Application\ /p:PublishProfile=Properties\PublishProfiles\x64.pubxml
build: build:
project: Installer\Installer.sln project: Installer\Installer.sln