Home > Blockchain >  How could I move WebView2 folders to a different location?
How could I move WebView2 folders to a different location?

Time:04-13

Is there any possible way of moving the runtimes and *.exe.WebView2 folders created by the Microsoft WebView2 WPF package to a different folder or perhaps embedding them? The 2 folders are selected in the screenshot below.

The 2 folders I dont want

I already use Costura.Fody to embed dlls. The ideal result would be if those 2 folders would be moved to the bin folder.

CodePudding user response:

The .\{ExecutableName}.WebView2 folder is the default location of the user data folder. This contains all state generated by the WebView2 (cookies, HTTP cache, indexeddb storage, and so on) and by default is placed in the same folder as the host app's executable. But you can (and should) specify a different path to store the user's WebView2 state. For more information about the user data folder and where to place it see the Manage user data folders doc.

The second folder .\runtimes contains the WebView2Loader.dll file in different CPU architectures. There's currently no way to specify the path to find this but that has been requested (GH issue) and is in our backlog.

  • Related