diff --git a/App/App.csproj b/App/App.csproj index bd36f38..ad64991 100644 --- a/App/App.csproj +++ b/App/App.csproj @@ -17,6 +17,8 @@ preview DISABLE_XAML_GENERATED_MAIN;DISABLE_XAML_GENERATED_BREAK_ON_UNHANDLED_EXCEPTION + + 0.1.0.0 Coder Desktop Coder Desktop diff --git a/App/ViewModels/UpdaterUpdateAvailableViewModel.cs b/App/ViewModels/UpdaterUpdateAvailableViewModel.cs index 9fd6dd9..4d3c692 100644 --- a/App/ViewModels/UpdaterUpdateAvailableViewModel.cs +++ b/App/ViewModels/UpdaterUpdateAvailableViewModel.cs @@ -4,10 +4,12 @@ using System.IO; using System.Linq; using System.Threading.Tasks; +using Coder.Desktop.App.Services; using CommunityToolkit.Mvvm.ComponentModel; using Microsoft.Extensions.Logging; using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Controls; +using Microsoft.Web.WebView2.Core; using NetSparkleUpdater; using NetSparkleUpdater.Enums; using NetSparkleUpdater.Events; @@ -174,8 +176,18 @@ public async Task Changelog_Loaded(object sender, RoutedEventArgs e) if (sender is not WebView2 webView) return; - // Start the engine. - await webView.EnsureCoreWebView2Async(); + // Start the engine with a custom user data folder. The default for + // unpackaged WinUI 3 apps is to write to a subfolder in the app's + // install directory, which is Program Files by default and not + // writeable by the user. + var userDataFolder = Path.Join(SettingsManagerUtils.AppSettingsDirectory(), "WebView2"); + _logger.LogDebug("Creating WebView2 user data folder at {UserDataFolder}", userDataFolder); + Directory.CreateDirectory(userDataFolder); + var env = await CoreWebView2Environment.CreateWithOptionsAsync( + null, + userDataFolder, + new CoreWebView2EnvironmentOptions()); + await webView.EnsureCoreWebView2Async(env); // Disable unwanted features. var settings = webView.CoreWebView2.Settings; pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy