You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Once you register a browser extension with AddBrowserExtensionAsync, the CacheFolder is locked by msedgewebview2.exe and cannot be deleted even when the app is closed.
environment
Microsoft Visual Studio Community 2022 (64 bit) - Preview
Version 17.13.0 Preview 2.0
cacheFolderPath 「%temp%\WebView2Cache」
「Microsoft Visual Studio 2022」closed.
「%temp%\WebView2Cache」Folder deletion failed.
Search for "WebView2Cache" in resmon.exe
The results are as follows:
Upon checking, I found that 「%temp%\WebView2Cache」 was not terminated and remained locked by "msedgewebview2.exe".
During debugging, "msedgewebview2.exe" does not terminate 「%userprofile%\AppData\Local\Microsoft\VisualStudio\Webview2Cache」.
The folder can be deleted by terminating the "msedgewebview2.exe" process.
However, there is still a problem with unnecessary processes remaining.
Importance
Important. My app's user experience is significantly compromised.
Runtime Channel
Stable release (WebView2 Runtime)
Runtime Version
131.0.2903.86
SDK Version
1.0.2903.40
Framework
Winforms
Operating System
Windows 11
OS Version
24H2 26100.2454
Repro steps
code
using Microsoft.Web.WebView2.Core;
using System;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace WebView2_TEST_C_
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private async Task InitializeAsync()
{
WebView2.CoreWebView2InitializationCompleted += WebView2_CoreWebView2InitializationCompleted;
string cacheFolderPath = @"<%temp%>\WebView2Cache";
options.AreBrowserExtensionsEnabled = true;
CoreWebView2Environment environment = await CoreWebView2Environment.CreateAsync(null, cacheFolderPath, options);
await WebView2.EnsureCoreWebView2Async(environment);
}
private async void Form1_Load(object sender, EventArgs e)
{
await InitializeAsync();
}
private async void WebView2_CoreWebView2InitializationCompleted(object sender, Microsoft.Web.WebView2.Core.CoreWebView2InitializationCompletedEventArgs e)
{
// Operation confirmed on edge
var path = @"<%userprofile%>AppData\Local\Microsoft\Edge\User Data\Default\Extensions\xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\1.0.0.0_0";
var extension = await WebView2.CoreWebView2.Profile.AddBrowserExtensionAsync(path);
}
}
}
Repros in Edge Browser
No, issue does not reproduce in the corresponding Edge version
Regression
Don't know
Last working version (if regression)
No response
The text was updated successfully, but these errors were encountered:
What happened?
Once you register a browser extension with AddBrowserExtensionAsync, the CacheFolder is locked by msedgewebview2.exe and cannot be deleted even when the app is closed.
environment
Microsoft Visual Studio Community 2022 (64 bit) - Preview
Version 17.13.0 Preview 2.0
cacheFolderPath 「%temp%\WebView2Cache」
「Microsoft Visual Studio 2022」closed.
「%temp%\WebView2Cache」Folder deletion failed.
Search for "WebView2Cache" in resmon.exe
The results are as follows:
Upon checking, I found that 「%temp%\WebView2Cache」 was not terminated and remained locked by "msedgewebview2.exe".
During debugging, "msedgewebview2.exe" does not terminate 「%userprofile%\AppData\Local\Microsoft\VisualStudio\Webview2Cache」.
The folder can be deleted by terminating the "msedgewebview2.exe" process.
However, there is still a problem with unnecessary processes remaining.
Importance
Important. My app's user experience is significantly compromised.
Runtime Channel
Stable release (WebView2 Runtime)
Runtime Version
131.0.2903.86
SDK Version
1.0.2903.40
Framework
Winforms
Operating System
Windows 11
OS Version
24H2 26100.2454
Repro steps
code
Repros in Edge Browser
No, issue does not reproduce in the corresponding Edge version
Regression
Don't know
Last working version (if regression)
No response
The text was updated successfully, but these errors were encountered: