Skip to content

Commit 0a2a561

Browse files
Copilotjfversluis
andcommitted
Fix markdown linting errors in webview2-program-files-warning.md
Co-authored-by: jfversluis <939291+jfversluis@users.noreply.github.com>
1 parent 23cce2e commit 0a2a561

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/user-interface/controls/includes/webview2-program-files-warning.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ ms.date: 09/19/2025
55

66
> [!WARNING]
77
> On Windows, apps using WebView2-based controls that are installed to the `Program Files` directory may fail to render content properly. This occurs because WebView2 attempts to write its cache and user data files to the app's installation directory, which has restricted write permissions in `Program Files`. To resolve this issue, set the `WEBVIEW2_USER_DATA_FOLDER` environment variable before any WebView control is initialized:
8-
>
8+
>
99
> ```csharp
1010
> #if WINDOWS
1111
> var userDataFolder = Path.Combine(FileSystem.AppDataDirectory, "WebView2");
1212
> Environment.SetEnvironmentVariable("WEBVIEW2_USER_DATA_FOLDER", userDataFolder);
1313
> #endif
1414
> ```
15-
>
16-
> Place this code in your `App.xaml.cs` constructor or in `Platforms\Windows\App.xaml.cs` before any WebView control is created. This directs WebView2 to use a writable location in the user's AppData directory instead of the restricted Program Files location.
15+
>
16+
> Place this code in your `App.xaml.cs` constructor or in `Platforms\Windows\App.xaml.cs` before any WebView control is created. This directs WebView2 to use a writable location in the user's AppData directory instead of the restricted Program Files location.

0 commit comments

Comments
 (0)