

If your application is assuming the current default handling it could result a breaking change once the default is moved.
Please note that this naming and implementation is preliminary and subject to change. Developers can use this if they want to clean the folder for any reason. To simplify finding out where your User Directory Folder has been created we are going to be introducing a new API that will report where exactly the User Directory Folder for this running WebView2 application process has been created. There will be some additional attribution on the path to help reduce collisions in case there is more than one installed copy of the application.

This is a windows standard process for getting a writable location to store application data. Instead of just creating the folder next to the exe we will be creating the folder in the path returned by SHGetKnownFolderPath (FOLDERID_LocalAppData,…) MSDN Documentation. In an upcoming release we will be changing the way that the default folder is handled. However, with the current default location, we sometimes see the user data folder created alongside the application in locations with limited permissions such as Program Files, which results in malfunction of the control. The intention of the default location is for developers to start prototyping WebView2 solutions with the least amount of resistance, but as a best practice (WebView2 development best practices - Microsoft Edge Development | Microsoft Docs), we recommend developers specify their own user data folder path and own the folder lifetime for production apps. This case is used when the developer has not specified the user directory folder. The current implementation of WebView2 User Data Folder default handling is to create a directory alongside the WebView2 hosting application and use that for runtime content.
