Browse Source

Fix AOT and x-plat settings path inference

pull/3203/head
Christoph Wille 1 year ago
parent
commit
be8e788b37
  1. 14
      ILSpy/ILSpySettingsFilePathProvider.cs

14
ILSpy/ILSpySettingsFilePathProvider.cs

@ -29,10 +29,16 @@ namespace ICSharpCode.ILSpy @@ -29,10 +29,16 @@ namespace ICSharpCode.ILSpy
{
if (App.CommandLineArguments.ConfigFile != null)
return App.CommandLineArguments.ConfigFile;
string localPath = Path.Combine(Path.GetDirectoryName(typeof(MainWindow).Assembly.Location), "ILSpy.xml");
if (File.Exists(localPath))
return localPath;
return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "ICSharpCode\\ILSpy.xml");
var assemblyLocation = typeof(MainWindow).Assembly.Location;
if (!String.IsNullOrEmpty(assemblyLocation))
{
string localPath = Path.Combine(Path.GetDirectoryName(assemblyLocation), "ILSpy.xml");
if (File.Exists(localPath))
return localPath;
}
return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "ICSharpCode", "ILSpy.xml");
}
}
}

Loading…
Cancel
Save