From 59e98038c1af6c11fb07095f2f33214b27ba4baa Mon Sep 17 00:00:00 2001 From: shanji <18996038927@163.com> Date: Fri, 1 Apr 2022 19:39:30 +0800 Subject: [PATCH] 10004 --- BBWY.Client/BBWY.Client.csproj | 2 +- BBWY.Client/Views/MainWindow.xaml | 1 + BBWY.Client/WebView2Manager.cs | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/BBWY.Client/BBWY.Client.csproj b/BBWY.Client/BBWY.Client.csproj index a3c67933..cfa2c1b6 100644 --- a/BBWY.Client/BBWY.Client.csproj +++ b/BBWY.Client/BBWY.Client.csproj @@ -1,7 +1,7 @@  - Exe + WinExe netcoreapp3.1 true Resources\Images\bbwylogo.ico diff --git a/BBWY.Client/Views/MainWindow.xaml b/BBWY.Client/Views/MainWindow.xaml index 07ea6fc3..9047104f 100644 --- a/BBWY.Client/Views/MainWindow.xaml +++ b/BBWY.Client/Views/MainWindow.xaml @@ -26,6 +26,7 @@ + diff --git a/BBWY.Client/WebView2Manager.cs b/BBWY.Client/WebView2Manager.cs index ab25c421..104711c3 100644 --- a/BBWY.Client/WebView2Manager.cs +++ b/BBWY.Client/WebView2Manager.cs @@ -16,7 +16,7 @@ namespace BBWY.Client public WebView2Manager() { wb2 = new WebView2(); - var wb2Setting = CoreWebView2Environment.CreateAsync(userDataFolder: io.Path.Combine(io.Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "WebView2UserData")).Result; + var wb2Setting = CoreWebView2Environment.CreateAsync(userDataFolder: io.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "WebView2UserData")).Result; wb2.EnsureCoreWebView2Async(wb2Setting); wb2.CoreWebView2InitializationCompleted += Wb2_CoreWebView2InitializationCompleted; wb2.NavigationCompleted += Wb2_NavigationCompleted;