Skip to content

Update custom UDF location guidance for WinUI3 unpackaged#3845

Open
elibroftw wants to merge 9 commits into
MicrosoftDocs:mainfrom
elibroftw:patch-1
Open

Update custom UDF location guidance for WinUI3 unpackaged#3845
elibroftw wants to merge 9 commits into
MicrosoftDocs:mainfrom
elibroftw:patch-1

Conversation

@elibroftw

@elibroftw elibroftw commented Jun 26, 2026

Copy link
Copy Markdown

@learn-build-service-prod

Copy link
Copy Markdown
Contributor

Learn Build status updates of commit 55ad53e:

✅ Validation status: passed

File Status Preview URL Details
microsoft-edge/webview2/concepts/user-data-folder.md ✅Succeeded View

For more details, please refer to the build report.

@mikehoffms mikehoffms added the cat: webview2 WebView-related content. label Jun 26, 2026
@mikehoffms mikehoffms requested a review from david-risney June 26, 2026 21:27

On this platform, use the default UDF location.
<!-- todo: review -->
On this platform, use the default UDF location if distributing as packaged. If distributing as unpackaged, in scenarios where the install directory is protected, you must specify a custom UDF location.

@mikehoffms mikehoffms Jun 26, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-->
On this platform, use the default UDF location.
<!-- todo: review -->
On this platform, if distributing unpackaged to a protected install directory, you must specify a custom UDF location.

@mikehoffms mikehoffms Jun 26, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@learn-build-service-prod

Copy link
Copy Markdown
Contributor

Learn Build status updates of commit 04dde44:

✅ Validation status: passed

File Status Preview URL Details
microsoft-edge/webview2/concepts/user-data-folder.md ✅Succeeded View

For more details, please refer to the build report.

#### Example code

For example code, see the WinUI 3 `.cs` file, at [WebView2Samples repo > WebView2_WinUI3_Sample](https://github.com/MicrosoftEdge/WebView2Samples/tree/main/GettingStartedGuides/WinUI3_GettingStarted).
<!-- todo: review -->

@mikehoffms mikehoffms Jun 26, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@learn-build-service-prod

Copy link
Copy Markdown
Contributor

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

@learn-build-service-prod

Copy link
Copy Markdown
Contributor

Learn Build status updates of commit 6e339bb:

✅ Validation status: passed

File Status Preview URL Details
microsoft-edge/webview2/concepts/user-data-folder.md ✅Succeeded View

For more details, please refer to the build report.

@learn-build-service-prod

Copy link
Copy Markdown
Contributor

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

@learn-build-service-prod

Copy link
Copy Markdown
Contributor

Learn Build status updates of commit f03a1d0:

✅ Validation status: passed

File Status Preview URL Details
microsoft-edge/webview2/concepts/user-data-folder.md ✅Succeeded View

For more details, please refer to the build report.

// The default user data folder is next to the executable; however, the install dir (that is, /Program Files/) is protected.
var userDataFolder = Path.Combine(
Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),
"YOURAPPNAME", "WebView2"); // Decide whether you want to keep this dir after uninstall, or clean it up from the uninstaller. TODO: clarify "clean it up", ie delete the dir?

@mikehoffms mikehoffms Jun 26, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"YOURAPPNAME", "WebView2"); // Decide whether you want to keep this dir after uninstall, or clean it up from the uninstaller. TODO: clarify "clean it up", ie delete the dir?
"YOURAPPNAME", "WebView2"); // Decide whether you want to keep this dir after uninstall, or delete the dir by using the uninstaller.

does "leave this" (in the orig commit) mean keep this dir?

does "clean it up" (in the orig commit) mean del the dir?

does "from the installer" (in the orig commit) mean "by using the installer?"

orig commit:
image

@elibroftw

@learn-build-service-prod

Copy link
Copy Markdown
Contributor

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

@learn-build-service-prod

Copy link
Copy Markdown
Contributor

Learn Build status updates of commit 677df65:

✅ Validation status: passed

File Status Preview URL Details
microsoft-edge/webview2/concepts/user-data-folder.md ✅Succeeded View

For more details, please refer to the build report.

@learn-build-service-prod

Copy link
Copy Markdown
Contributor

Learn Build status updates of commit 1c7448d:

✅ Validation status: passed

File Status Preview URL Details
microsoft-edge/webview2/concepts/user-data-folder.md ✅Succeeded View

For more details, please refer to the build report.

@learn-build-service-prod

Copy link
Copy Markdown
Contributor

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

@learn-build-service-prod

Copy link
Copy Markdown
Contributor

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

@learn-build-service-prod

Copy link
Copy Markdown
Contributor

Learn Build status updates of commit b22e615:

✅ Validation status: passed

File Status Preview URL Details
microsoft-edge/webview2/concepts/user-data-folder.md ✅Succeeded View

For more details, please refer to the build report.

@learn-build-service-prod

Copy link
Copy Markdown
Contributor

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

@learn-build-service-prod

Copy link
Copy Markdown
Contributor

Learn Build status updates of commit 75fa423:

✅ Validation status: passed

File Status Preview URL Details
microsoft-edge/webview2/concepts/user-data-folder.md ✅Succeeded View

For more details, please refer to the build report.


**Example code:**

For example code, see the WinUI 2 (UWP) `.cs` file, at [WebView2Samples repo > webview2_sample_uwp](https://github.com/MicrosoftEdge/WebView2Samples/tree/main/SampleApps/webview2_sample_uwp).

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we specify the file name?

@david-risney


<!-- ```csharp -->
<!-- // ADO work item "[wv2] Update .NET (WPF/WinForms) sample to add code to retrieve UDF location" - then copy lines to here
<!-- todo: AB#? // ADO work item "[wv2] Update .NET (WPF/WinForms) sample to add code to retrieve UDF location" - then copy lines to here

@mikehoffms mikehoffms Jun 26, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AB#? [wv2] Update .NET (WPF/WinForms) sample to add code to retrieve UDF location

@captainbrosset


<!-- ```csharp -->
<!-- // ADO work item "[wv2] Update ClickOnce sample to add code to retrieve UDF location" - then copy lines to here
<!-- todo: AB#? // ADO work item "[wv2] Update ClickOnce sample to add code to retrieve UDF location" - then copy lines to here

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AB#? [wv2] Update ClickOnce sample to add code to retrieve UDF location

@captainbrosset

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cat: webview2 WebView-related content.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

User Data Folder guidance for WinUI 3 needs updating

2 participants