diff --git a/src/Lib/PCLAppConfig.FileSystemStream.UWP/UWPAppConfigPathExtractor.cs b/src/Lib/PCLAppConfig.FileSystemStream.UWP/UWPAppConfigPathExtractor.cs index 25716d7..3d5e27a 100644 --- a/src/Lib/PCLAppConfig.FileSystemStream.UWP/UWPAppConfigPathExtractor.cs +++ b/src/Lib/PCLAppConfig.FileSystemStream.UWP/UWPAppConfigPathExtractor.cs @@ -15,15 +15,20 @@ public string Path get { string rootPath = Package.Current.InstalledLocation.Path; - string exeConfig = System.IO.Path.Combine(rootPath, Package.Current.DisplayName + ".exe.config"); - if (!File.Exists(exeConfig)) + string packageConfig = System.IO.Path.Combine(rootPath, Package.Current.DisplayName + ".exe.config"); + string exeConfig = System.IO.Path.Combine(rootPath, System.AppDomain.CurrentDomain.FriendlyName + ".exe.config"); + if (File.Exists(packageConfig)) { - return System.IO.Path.Combine(rootPath, "App.config"); + return packageConfig; } - else + else if (File.Exists(exeConfig)) { return exeConfig; } + else + { + return System.IO.Path.Combine(rootPath, "App.config"); + } } } }