diff --git a/CHANGELIST.md b/CHANGELIST.md index c8e71e88..3f925d0f 100644 --- a/CHANGELIST.md +++ b/CHANGELIST.md @@ -8,6 +8,7 @@ - Fix build for older .NET - Move two extensions to a better location - Fix XGD3 SS ranges +- Fix config location in OptionsLoader ### 3.2.1 (2024-08-05) diff --git a/MPF.CLI/Program.cs b/MPF.CLI/Program.cs index 5b8878a4..0eb6c155 100644 --- a/MPF.CLI/Program.cs +++ b/MPF.CLI/Program.cs @@ -1,7 +1,6 @@ using System; using System.IO; #if NET40 -using System.Threading; using System.Threading.Tasks; #endif using BinaryObjectScanner; diff --git a/MPF.Frontend/Tools/OptionsLoader.cs b/MPF.Frontend/Tools/OptionsLoader.cs index b6c436fc..70ae6e82 100644 --- a/MPF.Frontend/Tools/OptionsLoader.cs +++ b/MPF.Frontend/Tools/OptionsLoader.cs @@ -9,7 +9,14 @@ namespace MPF.Frontend.Tools { public static class OptionsLoader { - private const string ConfigurationPath = "config.json"; + /// + /// Full path to the configuration file used by the program + /// +#if NET20 || NET35 || NET40 || NET452 + private static string ConfigurationPath => Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "config.json"); +#else + private static string ConfigurationPath => Path.Combine(AppContext.BaseDirectory, "config.json"); +#endif #region Arguments