From e1ea3b34f4c4dff83421091af074aa20b3a8815e Mon Sep 17 00:00:00 2001 From: Andrew KeepCoding Date: Sun, 23 Jul 2023 17:43:51 +0900 Subject: [PATCH 1/2] refactor: Change how to get the current directory Based on #11, replaced `Directory.GetCurrentDirectory()` with `AppContext.BaseDirectory`. --- WinUI3Localizer.SampleApp/App.xaml.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/WinUI3Localizer.SampleApp/App.xaml.cs b/WinUI3Localizer.SampleApp/App.xaml.cs index 0bc51ca..f354761 100644 --- a/WinUI3Localizer.SampleApp/App.xaml.cs +++ b/WinUI3Localizer.SampleApp/App.xaml.cs @@ -116,9 +116,7 @@ private async Task InitializeLocalizer() { #if IS_NON_PACKAGED // Initialize a "Strings" folder in the executables folder. - StringsFolderPath = Path.Combine(Directory.GetCurrentDirectory(), "Strings"); - - //StorageFolder localFolder = await StorageFolder.GetFolderFromPathAsync(Directory.GetCurrentDirectory()); + StringsFolderPath = Path.Combine(AppContext.BaseDirectory, "Strings"); StorageFolder stringsFolder = await StorageFolder.GetFolderFromPathAsync(StringsFolderPath); #else // Initialize a "Strings" folder in the "LocalFolder" for the packaged app. From aafdcbe072f42f788c05fee1899a00135cf12505 Mon Sep 17 00:00:00 2001 From: Andrew KeepCoding Date: Sun, 23 Jul 2023 17:46:06 +0900 Subject: [PATCH 2/2] chore: Update NuGet packages --- .../WinUI3Localizer.SampleApp.csproj | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/WinUI3Localizer.SampleApp/WinUI3Localizer.SampleApp.csproj b/WinUI3Localizer.SampleApp/WinUI3Localizer.SampleApp.csproj index 31b1bc7..9f91636 100644 --- a/WinUI3Localizer.SampleApp/WinUI3Localizer.SampleApp.csproj +++ b/WinUI3Localizer.SampleApp/WinUI3Localizer.SampleApp.csproj @@ -1,4 +1,4 @@ - + WinExe net7.0-windows10.0.19041.0 @@ -41,18 +41,18 @@ - - + + - + - - - + + +