Skip to content

Clarify UWP and WinUI testing samples - #10887

Open
Amaury Levé (Evangelink) wants to merge 7 commits into
microsoft:mainfrom
Evangelink:dev/amauryleve/verify-winui-mtp-samples
Open

Clarify UWP and WinUI testing samples#10887
Amaury Levé (Evangelink) wants to merge 7 commits into
microsoft:mainfrom
Evangelink:dev/amauryleve/verify-winui-mtp-samples

Conversation

@Evangelink

Copy link
Copy Markdown
Member

Windows application samples currently mix generic names, host modes, and packaging behaviors, making it difficult to identify which UWP and WinUI combinations are supported or how to run them locally.

This change organizes the supported scenarios as four explicitly named samples:

  • UwpVSTestApp
  • WinUIVSTestApp
  • WinUIMtpPackagedApp
  • WinUIMtpUnpackagedApp

The MTP samples are flattened under samples/public, carry local native-MTP global.json configuration, and support both dotnet run and dotnet test. The packaged MTP sample is self-contained so it does not require a preinstalled Windows App SDK runtime.

The VSTest samples support dotnet test by using Visual Studio MSBuild for Windows application packaging and then executing the generated AppX recipe through Visual Studio's UWP-aware VSTest console. A public sample matrix documents supported and unsupported host/packaging combinations and the exact local commands.

Validation:

  • Both MTP samples pass through dotnet run.
  • Both MTP samples pass through native dotnet test.
  • The UWP and packaged WinUI samples each pass two tests through dotnet test and their generated AppX recipes.
  • Both affected acceptance-test projects build successfully.

Rename and organize the UWP and WinUI samples by test host and packaging mode. Make the MTP samples runnable through dotnet run and native dotnet test, and route packaged VSTest samples through Visual Studio AppX recipes from dotnet test.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 480f07f9-4248-4ef6-83aa-9fae4ca1b5a7
CopilotAI balanced review requested due to automatic review settings August 31, 2026 11:02
@EvangelinkAmaury Levé (Evangelink) added the state/needs-review Awaiting review from the team. label Aug 31, 2026

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

Review tier: Balanced
Findings: 1 Low severity

New issues introduced by this change (1)
SeverityFinding
Low severitysamples/​public/​README.md — This MTP command uses the native dotnet test --project syntax, which is available only in .NET…
What changed in this PR

Clarifies supported UWP/WinUI testing combinations by organizing samples around application model, host, and packaging mode.

Changes:

  • Renames and flattens four Windows application samples.
  • Adds VSTest AppX-recipe execution and native MTP configuration.
  • Updates acceptance tests and documentation.
FileDescription
test/​IntegrationTests/​MSTest.Acceptance.IntegrationTests/​WindowsApplicationModelTestTools.csUses renamed UWP assets.
test/​IntegrationTests/​Microsoft.Testing.Platform.Acceptance.IntegrationTests/​PackagedWinUITests.csUses relocated packaged WinUI assets.
samples/​public/​WinUIVSTestApp/​WinUIVSTestApp.slnRenames the WinUI VSTest project.
samples/​public/​WinUIVSTestApp/​WinUIVSTestApp.csprojConfigures AppX-based VSTest execution.
samples/​public/​WinUIVSTestApp/​UnitTests.csUpdates the test namespace.
samples/​public/​WinUIVSTestApp/​UnitTestAppWindow.xaml.csUpdates the window namespace.
samples/​public/​WinUIVSTestApp/​UnitTestAppWindow.xamlUpdates WinUI type references.
samples/​public/​WinUIVSTestApp/​UnitTestApp.xaml.csUpdates the application namespace.
samples/​public/​WinUIVSTestApp/​UnitTestApp.xamlUpdates WinUI type references.
samples/​public/​WinUIVSTestApp/​Properties/​PublishProfiles/​win-x86.pubxmlAdds x86 publishing settings.
samples/​public/​WinUIVSTestApp/​Properties/​PublishProfiles/​win-x64.pubxmlAdds x64 publishing settings.
samples/​public/​WinUIVSTestApp/​Properties/​PublishProfiles/​win-arm64.pubxmlAdds ARM64 publishing settings.
samples/​public/​WinUIVSTestApp/​Properties/​launchSettings.jsonAdds packaged launch configuration.
samples/​public/​WinUIVSTestApp/​Package.appxmanifestRenames package metadata.
samples/​public/​WinUIVSTestApp/​Assets/​Wide310x150Logo.scale-200.pngSupplies package artwork.
samples/​public/​WinUIVSTestApp/​Assets/​StoreLogo.pngSupplies package artwork.
samples/​public/​WinUIVSTestApp/​Assets/​Square44x44Logo.targetsize-24_altform-unplated.pngSupplies package artwork.
samples/​public/​WinUIVSTestApp/​Assets/​Square44x44Logo.scale-200.pngSupplies package artwork.
samples/​public/​WinUIVSTestApp/​Assets/​Square150x150Logo.scale-200.pngSupplies package artwork.
samples/​public/​WinUIVSTestApp/​Assets/​SplashScreen.scale-200.pngSupplies package artwork.
samples/​public/​WinUIVSTestApp/​Assets/​LockScreenLogo.scale-200.pngSupplies package artwork.
samples/​public/​WinUIVSTestApp/​app.manifestRenames assembly identity.
samples/​public/​WinUIMtpUnpackagedApp/​WinUIMtpUnpackagedApp.slnxFlattens the solution layout.
samples/​public/​WinUIMtpUnpackagedApp/​WinUIMtpUnpackagedApp.csprojRenames the project namespace.
samples/​public/​WinUIMtpUnpackagedApp/​UnitTests.csUpdates the test namespace.
samples/​public/​WinUIMtpUnpackagedApp/​UnitTestAppWindow.xaml.csUpdates the window namespace.
samples/​public/​WinUIMtpUnpackagedApp/​UnitTestAppWindow.xamlUpdates WinUI type references.
samples/​public/​WinUIMtpUnpackagedApp/​UnitTestApp.xaml.csUpdates the application namespace.
samples/​public/​WinUIMtpUnpackagedApp/​UnitTestApp.xamlUpdates WinUI type references.
samples/​public/​WinUIMtpUnpackagedApp/​Properties/​launchSettings.jsonRenames the launch profile.
samples/​public/​WinUIMtpUnpackagedApp/​global.jsonSelects native MTP execution.
samples/​public/​WinUIMtpUnpackagedApp/​app.manifestRenames assembly identity.
samples/​public/​WinUIMtpPackagedApp/​WinUIMtpPackagedApp.slnxFlattens the solution layout.
samples/​public/​WinUIMtpPackagedApp/​WinUIMtpPackagedApp.csprojEnables self-contained Windows App SDK deployment.
samples/​public/​WinUIMtpPackagedApp/​UnitTests.csUpdates the test namespace.
samples/​public/​WinUIMtpPackagedApp/​UnitTestAppWindow.xaml.csUpdates the window namespace.
samples/​public/​WinUIMtpPackagedApp/​UnitTestAppWindow.xamlUpdates WinUI type references.
samples/​public/​WinUIMtpPackagedApp/​UnitTestApp.xaml.csUpdates the MTP entry-point reference.
samples/​public/​WinUIMtpPackagedApp/​UnitTestApp.xamlUpdates WinUI type references.
samples/​public/​WinUIMtpPackagedApp/​Properties/​PublishProfiles/​win-x86.pubxmlAdds x86 publishing settings.
samples/​public/​WinUIMtpPackagedApp/​Properties/​PublishProfiles/​win-x64.pubxmlAdds x64 publishing settings.
samples/​public/​WinUIMtpPackagedApp/​Properties/​PublishProfiles/​win-arm64.pubxmlAdds ARM64 publishing settings.
samples/​public/​WinUIMtpPackagedApp/​Properties/​launchSettings.jsonSeparates MTP and package launch profiles.
samples/​public/​WinUIMtpPackagedApp/​Package.appxmanifestRenames package metadata.
samples/​public/​WinUIMtpPackagedApp/​global.jsonSelects native MTP execution.
samples/​public/​WinUIMtpPackagedApp/​Assets/​Wide310x150Logo.scale-200.pngSupplies package artwork.
samples/​public/​WinUIMtpPackagedApp/​Assets/​StoreLogo.pngSupplies package artwork.
samples/​public/​WinUIMtpPackagedApp/​Assets/​Square44x44Logo.targetsize-24_altform-unplated.pngSupplies package artwork.
samples/​public/​WinUIMtpPackagedApp/​Assets/​Square44x44Logo.scale-200.pngSupplies package artwork.
samples/​public/​WinUIMtpPackagedApp/​Assets/​Square150x150Logo.scale-200.pngSupplies package artwork.
samples/​public/​WinUIMtpPackagedApp/​Assets/​SplashScreen.scale-200.pngSupplies package artwork.
samples/​public/​WinUIMtpPackagedApp/​Assets/​LockScreenLogo.scale-200.pngSupplies package artwork.
samples/​public/​WinUIMtpPackagedApp/​app.manifestRenames assembly identity.
samples/​public/​UwpVSTestApp/​UwpVSTestApp.slnRenames the UWP solution.
samples/​public/​UwpVSTestApp/​UwpVSTestApp.csprojConfigures UWP VSTest execution.
samples/​public/​UwpVSTestApp/​UnitTests.csAdds package and UI-thread tests.
samples/​public/​UwpVSTestApp/​Properties/​PublishProfiles/​win-x86.pubxmlAdds x86 publishing settings.
samples/​public/​UwpVSTestApp/​Properties/​PublishProfiles/​win-x64.pubxmlAdds x64 publishing settings.
samples/​public/​UwpVSTestApp/​Properties/​PublishProfiles/​win-arm64.pubxmlAdds ARM64 publishing settings.
samples/​public/​UwpVSTestApp/​Properties/​launchSettings.jsonRenames the package launch profile.
samples/​public/​UwpVSTestApp/​Package.appxmanifestConfigures the UWP VSTest application.
samples/​public/​UwpVSTestApp/​MainPage.xaml.csUpdates the page namespace.
samples/​public/​UwpVSTestApp/​MainPage.xamlUpdates UWP type references.
samples/​public/​UwpVSTestApp/​Assets/​Wide310x150Logo.scale-200.pngSupplies package artwork.
samples/​public/​UwpVSTestApp/​Assets/​StoreLogo.pngSupplies package artwork.
samples/​public/​UwpVSTestApp/​Assets/​Square44x44Logo.targetsize-24_altform-unplated.pngSupplies package artwork.
samples/​public/​UwpVSTestApp/​Assets/​Square44x44Logo.scale-200.pngSupplies package artwork.
samples/​public/​UwpVSTestApp/​Assets/​Square150x150Logo.scale-200.pngSupplies package artwork.
samples/​public/​UwpVSTestApp/​Assets/​SplashScreen.scale-200.pngSupplies package artwork.
samples/​public/​UwpVSTestApp/​Assets/​LockScreenLogo.scale-200.pngSupplies package artwork.
samples/​public/​UwpVSTestApp/​App.xaml.csUpdates the application namespace.
samples/​public/​UwpVSTestApp/​App.xamlUpdates UWP type references.
samples/​public/​README.mdDocuments the sample matrix and commands.
samples/​public/​mstest-runner/​MSTestRunnerWinUI/​MSTestRunnerWinUI/​Properties/​launchSettings.jsonRemoves the legacy launch profiles.
samples/​public/​Directory.Build.targetsBuilds and runs Windows AppX VSTest recipes.
samples/​public/​BlankUwpNet9App/​UnitTests.csRemoves the superseded UWP tests.
samples/​public/​BlankUwpNet9App/​BlankUwpNet9App.csprojRemoves the superseded project.
docs/​winui-testing.mdLinks all four renamed samples.
docs/​RFCs/​017-TestHost-Launcher.mdUpdates the packaged sample reference.
Suppressed comments (1)

samples/public/UwpVSTestApp/UwpVSTestApp.sln:6

  • Renaming this solution leaves eng/build-samples.ps1:67 checking only for BlankUwpNet9App.sln. The renamed UWP sample therefore falls into the ordinary dotnet build branch even though that script explicitly routes UWP projects through Visual Studio MSBuild, so the Samples CI job will use the wrong build path. Update the script predicate to recognize UwpVSTestApp.sln (or detect UWP projects structurally).

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment threadsamples/public/README.md
Document the .NET SDK 10 prerequisite for native MTP dotnet test and keep the renamed UWP sample on the Visual Studio MSBuild path in Samples CI.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 480f07f9-4248-4ef6-83aa-9fae4ca1b5a7
CopilotAI review requested due to automatic review settings August 31, 2026 11:27

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

Review tier: Balanced
Findings: None

Issues resolved since last review (1)
SeverityFinding
Low severitysamples/​public/​README.md — This MTP command uses the native dotnet test --project syntax, which is available only in .NET… View resolved comment

The previous Windows Release job timed out after broad acceptance-test stalls while the Windows application-model and samples jobs passed.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 480f07f9-4248-4ef6-83aa-9fae4ca1b5a7
The prior run hit an unrelated Timeout_BoundsBlockingDisposalWithoutRetryingIt flake; all changed-area Windows sample and application-model jobs passed.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 480f07f9-4248-4ef6-83aa-9fae4ca1b5a7
Previous Windows Release attempts timed out on unrelated process-based acceptance tests across distinct agents; changed-area jobs passed.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 480f07f9-4248-4ef6-83aa-9fae4ca1b5a7
CopilotAI review requested due to automatic review settings September 1, 2026 07:46

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

Review tier: Balanced
Findings: 2 Medium severity

New issues introduced by this change (2)
SeverityFinding
Medium severitysamples/​public/​Directory.Build.targets — The nested invocation always restores and builds, so the standard dotnet test --no-build and…
Medium severitysamples/​public/​Directory.Build.targets — This replacement VSTest invocation forwards only filter, logger, results directory, and list-tests.…

Comment threadsamples/public/Directory.Build.targets Outdated
Comment threadsamples/public/Directory.Build.targets Outdated
Capture no-build and restore intent separately from the suppressed SDK prebuild, forward the complete user-facing VSTest option set through a session-specific response file, and clean temporary files on success, failure, and Clean.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 480f07f9-4248-4ef6-83aa-9fae4ca1b5a7
CopilotAI review requested due to automatic review settings September 1, 2026 09:00

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

Review tier: Balanced
Findings: None

Issues resolved since last review (2)
SeverityFinding
Medium severitysamples/​public/​Directory.Build.targets — This replacement VSTest invocation forwards only filter, logger, results directory, and list-tests.… View resolved comment
Medium severitysamples/​public/​Directory.Build.targets — The nested invocation always restores and builds, so the standard dotnet test --no-build and… View resolved comment
Suppressed comments (1)

Previously missed (1) — in code that hasn't changed since the last review.

samples/public/README.md:35

  • These commands inherit the repository-root global.json, which sets test.runner to Microsoft.Testing.Platform (global.json:36-37). On .NET SDK 10+, that global selection routes both VSTest-only projects through MTP instead of the _VSTestConsole path, so the documented commands do not exercise the AppX recipes from this checkout. Add a local global.json selecting VSTest to each VSTest sample directory, mirroring the local MTP configurations.
# UWP VSTest sample
dotnet test UwpVSTestApp.csproj -p:Platform=x64
# WinUI VSTest sample
dotnet test WinUIVSTestApp.csproj -p:Platform=x64

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

Labels

state/needs-reviewAwaiting review from the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@Evangelink@0101
, 'i'); if (__m === '*' || __re.test(location.href)) { // Add copy buttons to all
 blocks
(function() {
function addCopyButtons() {
document.querySelectorAll('pre code').forEach(function(codeBlock) {
if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;
codeBlock.parentElement.setAttribute('data-copy-added', 'true');
var btn = document.createElement('button');
btn.textContent = 'Copy';
btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';
btn.onmouseover = function() { this.style.opacity = '1'; };
btn.onmouseout = function() { this.style.opacity = '0.7'; };
btn.onclick = function() {
navigator.clipboard.writeText(codeBlock.textContent).then(function() {
btn.textContent = 'Copied!';
setTimeout(function() { btn.textContent = 'Copy'; }, 1500);
});
};
codeBlock.parentElement.style.position = 'relative';
codeBlock.parentElement.appendChild(btn);
});
}
addCopyButtons();
// Re-run on dynamic content
var observer = new MutationObserver(addCopyButtons);
observer.observe(document.body, { childList: true, subtree: true });
})();
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Clarify UWP and WinUI testing samples by Evangelink · Pull Request #10887 · microsoft/testfx · GitHub
Skip to content

Clarify UWP and WinUI testing samples - #10887

Open
Amaury Levé (Evangelink) wants to merge 7 commits into
microsoft:mainfrom
Evangelink:dev/amauryleve/verify-winui-mtp-samples
Open

Clarify UWP and WinUI testing samples#10887
Amaury Levé (Evangelink) wants to merge 7 commits into
microsoft:mainfrom
Evangelink:dev/amauryleve/verify-winui-mtp-samples

Conversation

@Evangelink

Copy link
Copy Markdown
Member

Windows application samples currently mix generic names, host modes, and packaging behaviors, making it difficult to identify which UWP and WinUI combinations are supported or how to run them locally.

This change organizes the supported scenarios as four explicitly named samples:

  • UwpVSTestApp
  • WinUIVSTestApp
  • WinUIMtpPackagedApp
  • WinUIMtpUnpackagedApp

The MTP samples are flattened under samples/public, carry local native-MTP global.json configuration, and support both dotnet run and dotnet test. The packaged MTP sample is self-contained so it does not require a preinstalled Windows App SDK runtime.

The VSTest samples support dotnet test by using Visual Studio MSBuild for Windows application packaging and then executing the generated AppX recipe through Visual Studio's UWP-aware VSTest console. A public sample matrix documents supported and unsupported host/packaging combinations and the exact local commands.

Validation:

  • Both MTP samples pass through dotnet run.
  • Both MTP samples pass through native dotnet test.
  • The UWP and packaged WinUI samples each pass two tests through dotnet test and their generated AppX recipes.
  • Both affected acceptance-test projects build successfully.

Rename and organize the UWP and WinUI samples by test host and packaging mode. Make the MTP samples runnable through dotnet run and native dotnet test, and route packaged VSTest samples through Visual Studio AppX recipes from dotnet test.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 480f07f9-4248-4ef6-83aa-9fae4ca1b5a7
CopilotAI balanced review requested due to automatic review settings August 31, 2026 11:02
@EvangelinkAmaury Levé (Evangelink) added the state/needs-review Awaiting review from the team. label Aug 31, 2026

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

Review tier: Balanced
Findings: 1 Low severity

New issues introduced by this change (1)
SeverityFinding
Low severitysamples/​public/​README.md — This MTP command uses the native dotnet test --project syntax, which is available only in .NET…
What changed in this PR

Clarifies supported UWP/WinUI testing combinations by organizing samples around application model, host, and packaging mode.

Changes:

  • Renames and flattens four Windows application samples.
  • Adds VSTest AppX-recipe execution and native MTP configuration.
  • Updates acceptance tests and documentation.
FileDescription
test/​IntegrationTests/​MSTest.Acceptance.IntegrationTests/​WindowsApplicationModelTestTools.csUses renamed UWP assets.
test/​IntegrationTests/​Microsoft.Testing.Platform.Acceptance.IntegrationTests/​PackagedWinUITests.csUses relocated packaged WinUI assets.
samples/​public/​WinUIVSTestApp/​WinUIVSTestApp.slnRenames the WinUI VSTest project.
samples/​public/​WinUIVSTestApp/​WinUIVSTestApp.csprojConfigures AppX-based VSTest execution.
samples/​public/​WinUIVSTestApp/​UnitTests.csUpdates the test namespace.
samples/​public/​WinUIVSTestApp/​UnitTestAppWindow.xaml.csUpdates the window namespace.
samples/​public/​WinUIVSTestApp/​UnitTestAppWindow.xamlUpdates WinUI type references.
samples/​public/​WinUIVSTestApp/​UnitTestApp.xaml.csUpdates the application namespace.
samples/​public/​WinUIVSTestApp/​UnitTestApp.xamlUpdates WinUI type references.
samples/​public/​WinUIVSTestApp/​Properties/​PublishProfiles/​win-x86.pubxmlAdds x86 publishing settings.
samples/​public/​WinUIVSTestApp/​Properties/​PublishProfiles/​win-x64.pubxmlAdds x64 publishing settings.
samples/​public/​WinUIVSTestApp/​Properties/​PublishProfiles/​win-arm64.pubxmlAdds ARM64 publishing settings.
samples/​public/​WinUIVSTestApp/​Properties/​launchSettings.jsonAdds packaged launch configuration.
samples/​public/​WinUIVSTestApp/​Package.appxmanifestRenames package metadata.
samples/​public/​WinUIVSTestApp/​Assets/​Wide310x150Logo.scale-200.pngSupplies package artwork.
samples/​public/​WinUIVSTestApp/​Assets/​StoreLogo.pngSupplies package artwork.
samples/​public/​WinUIVSTestApp/​Assets/​Square44x44Logo.targetsize-24_altform-unplated.pngSupplies package artwork.
samples/​public/​WinUIVSTestApp/​Assets/​Square44x44Logo.scale-200.pngSupplies package artwork.
samples/​public/​WinUIVSTestApp/​Assets/​Square150x150Logo.scale-200.pngSupplies package artwork.
samples/​public/​WinUIVSTestApp/​Assets/​SplashScreen.scale-200.pngSupplies package artwork.
samples/​public/​WinUIVSTestApp/​Assets/​LockScreenLogo.scale-200.pngSupplies package artwork.
samples/​public/​WinUIVSTestApp/​app.manifestRenames assembly identity.
samples/​public/​WinUIMtpUnpackagedApp/​WinUIMtpUnpackagedApp.slnxFlattens the solution layout.
samples/​public/​WinUIMtpUnpackagedApp/​WinUIMtpUnpackagedApp.csprojRenames the project namespace.
samples/​public/​WinUIMtpUnpackagedApp/​UnitTests.csUpdates the test namespace.
samples/​public/​WinUIMtpUnpackagedApp/​UnitTestAppWindow.xaml.csUpdates the window namespace.
samples/​public/​WinUIMtpUnpackagedApp/​UnitTestAppWindow.xamlUpdates WinUI type references.
samples/​public/​WinUIMtpUnpackagedApp/​UnitTestApp.xaml.csUpdates the application namespace.
samples/​public/​WinUIMtpUnpackagedApp/​UnitTestApp.xamlUpdates WinUI type references.
samples/​public/​WinUIMtpUnpackagedApp/​Properties/​launchSettings.jsonRenames the launch profile.
samples/​public/​WinUIMtpUnpackagedApp/​global.jsonSelects native MTP execution.
samples/​public/​WinUIMtpUnpackagedApp/​app.manifestRenames assembly identity.
samples/​public/​WinUIMtpPackagedApp/​WinUIMtpPackagedApp.slnxFlattens the solution layout.
samples/​public/​WinUIMtpPackagedApp/​WinUIMtpPackagedApp.csprojEnables self-contained Windows App SDK deployment.
samples/​public/​WinUIMtpPackagedApp/​UnitTests.csUpdates the test namespace.
samples/​public/​WinUIMtpPackagedApp/​UnitTestAppWindow.xaml.csUpdates the window namespace.
samples/​public/​WinUIMtpPackagedApp/​UnitTestAppWindow.xamlUpdates WinUI type references.
samples/​public/​WinUIMtpPackagedApp/​UnitTestApp.xaml.csUpdates the MTP entry-point reference.
samples/​public/​WinUIMtpPackagedApp/​UnitTestApp.xamlUpdates WinUI type references.
samples/​public/​WinUIMtpPackagedApp/​Properties/​PublishProfiles/​win-x86.pubxmlAdds x86 publishing settings.
samples/​public/​WinUIMtpPackagedApp/​Properties/​PublishProfiles/​win-x64.pubxmlAdds x64 publishing settings.
samples/​public/​WinUIMtpPackagedApp/​Properties/​PublishProfiles/​win-arm64.pubxmlAdds ARM64 publishing settings.
samples/​public/​WinUIMtpPackagedApp/​Properties/​launchSettings.jsonSeparates MTP and package launch profiles.
samples/​public/​WinUIMtpPackagedApp/​Package.appxmanifestRenames package metadata.
samples/​public/​WinUIMtpPackagedApp/​global.jsonSelects native MTP execution.
samples/​public/​WinUIMtpPackagedApp/​Assets/​Wide310x150Logo.scale-200.pngSupplies package artwork.
samples/​public/​WinUIMtpPackagedApp/​Assets/​StoreLogo.pngSupplies package artwork.
samples/​public/​WinUIMtpPackagedApp/​Assets/​Square44x44Logo.targetsize-24_altform-unplated.pngSupplies package artwork.
samples/​public/​WinUIMtpPackagedApp/​Assets/​Square44x44Logo.scale-200.pngSupplies package artwork.
samples/​public/​WinUIMtpPackagedApp/​Assets/​Square150x150Logo.scale-200.pngSupplies package artwork.
samples/​public/​WinUIMtpPackagedApp/​Assets/​SplashScreen.scale-200.pngSupplies package artwork.
samples/​public/​WinUIMtpPackagedApp/​Assets/​LockScreenLogo.scale-200.pngSupplies package artwork.
samples/​public/​WinUIMtpPackagedApp/​app.manifestRenames assembly identity.
samples/​public/​UwpVSTestApp/​UwpVSTestApp.slnRenames the UWP solution.
samples/​public/​UwpVSTestApp/​UwpVSTestApp.csprojConfigures UWP VSTest execution.
samples/​public/​UwpVSTestApp/​UnitTests.csAdds package and UI-thread tests.
samples/​public/​UwpVSTestApp/​Properties/​PublishProfiles/​win-x86.pubxmlAdds x86 publishing settings.
samples/​public/​UwpVSTestApp/​Properties/​PublishProfiles/​win-x64.pubxmlAdds x64 publishing settings.
samples/​public/​UwpVSTestApp/​Properties/​PublishProfiles/​win-arm64.pubxmlAdds ARM64 publishing settings.
samples/​public/​UwpVSTestApp/​Properties/​launchSettings.jsonRenames the package launch profile.
samples/​public/​UwpVSTestApp/​Package.appxmanifestConfigures the UWP VSTest application.
samples/​public/​UwpVSTestApp/​MainPage.xaml.csUpdates the page namespace.
samples/​public/​UwpVSTestApp/​MainPage.xamlUpdates UWP type references.
samples/​public/​UwpVSTestApp/​Assets/​Wide310x150Logo.scale-200.pngSupplies package artwork.
samples/​public/​UwpVSTestApp/​Assets/​StoreLogo.pngSupplies package artwork.
samples/​public/​UwpVSTestApp/​Assets/​Square44x44Logo.targetsize-24_altform-unplated.pngSupplies package artwork.
samples/​public/​UwpVSTestApp/​Assets/​Square44x44Logo.scale-200.pngSupplies package artwork.
samples/​public/​UwpVSTestApp/​Assets/​Square150x150Logo.scale-200.pngSupplies package artwork.
samples/​public/​UwpVSTestApp/​Assets/​SplashScreen.scale-200.pngSupplies package artwork.
samples/​public/​UwpVSTestApp/​Assets/​LockScreenLogo.scale-200.pngSupplies package artwork.
samples/​public/​UwpVSTestApp/​App.xaml.csUpdates the application namespace.
samples/​public/​UwpVSTestApp/​App.xamlUpdates UWP type references.
samples/​public/​README.mdDocuments the sample matrix and commands.
samples/​public/​mstest-runner/​MSTestRunnerWinUI/​MSTestRunnerWinUI/​Properties/​launchSettings.jsonRemoves the legacy launch profiles.
samples/​public/​Directory.Build.targetsBuilds and runs Windows AppX VSTest recipes.
samples/​public/​BlankUwpNet9App/​UnitTests.csRemoves the superseded UWP tests.
samples/​public/​BlankUwpNet9App/​BlankUwpNet9App.csprojRemoves the superseded project.
docs/​winui-testing.mdLinks all four renamed samples.
docs/​RFCs/​017-TestHost-Launcher.mdUpdates the packaged sample reference.
Suppressed comments (1)

samples/public/UwpVSTestApp/UwpVSTestApp.sln:6

  • Renaming this solution leaves eng/build-samples.ps1:67 checking only for BlankUwpNet9App.sln. The renamed UWP sample therefore falls into the ordinary dotnet build branch even though that script explicitly routes UWP projects through Visual Studio MSBuild, so the Samples CI job will use the wrong build path. Update the script predicate to recognize UwpVSTestApp.sln (or detect UWP projects structurally).

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment threadsamples/public/README.md
Document the .NET SDK 10 prerequisite for native MTP dotnet test and keep the renamed UWP sample on the Visual Studio MSBuild path in Samples CI.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 480f07f9-4248-4ef6-83aa-9fae4ca1b5a7
CopilotAI review requested due to automatic review settings August 31, 2026 11:27

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

Review tier: Balanced
Findings: None

Issues resolved since last review (1)
SeverityFinding
Low severitysamples/​public/​README.md — This MTP command uses the native dotnet test --project syntax, which is available only in .NET… View resolved comment

The previous Windows Release job timed out after broad acceptance-test stalls while the Windows application-model and samples jobs passed.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 480f07f9-4248-4ef6-83aa-9fae4ca1b5a7
The prior run hit an unrelated Timeout_BoundsBlockingDisposalWithoutRetryingIt flake; all changed-area Windows sample and application-model jobs passed.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 480f07f9-4248-4ef6-83aa-9fae4ca1b5a7
Previous Windows Release attempts timed out on unrelated process-based acceptance tests across distinct agents; changed-area jobs passed.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 480f07f9-4248-4ef6-83aa-9fae4ca1b5a7
CopilotAI review requested due to automatic review settings September 1, 2026 07:46

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

Review tier: Balanced
Findings: 2 Medium severity

New issues introduced by this change (2)
SeverityFinding
Medium severitysamples/​public/​Directory.Build.targets — The nested invocation always restores and builds, so the standard dotnet test --no-build and…
Medium severitysamples/​public/​Directory.Build.targets — This replacement VSTest invocation forwards only filter, logger, results directory, and list-tests.…

Comment threadsamples/public/Directory.Build.targets Outdated
Comment threadsamples/public/Directory.Build.targets Outdated
Capture no-build and restore intent separately from the suppressed SDK prebuild, forward the complete user-facing VSTest option set through a session-specific response file, and clean temporary files on success, failure, and Clean.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 480f07f9-4248-4ef6-83aa-9fae4ca1b5a7
CopilotAI review requested due to automatic review settings September 1, 2026 09:00

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

Review tier: Balanced
Findings: None

Issues resolved since last review (2)
SeverityFinding
Medium severitysamples/​public/​Directory.Build.targets — This replacement VSTest invocation forwards only filter, logger, results directory, and list-tests.… View resolved comment
Medium severitysamples/​public/​Directory.Build.targets — The nested invocation always restores and builds, so the standard dotnet test --no-build and… View resolved comment
Suppressed comments (1)

Previously missed (1) — in code that hasn't changed since the last review.

samples/public/README.md:35

  • These commands inherit the repository-root global.json, which sets test.runner to Microsoft.Testing.Platform (global.json:36-37). On .NET SDK 10+, that global selection routes both VSTest-only projects through MTP instead of the _VSTestConsole path, so the documented commands do not exercise the AppX recipes from this checkout. Add a local global.json selecting VSTest to each VSTest sample directory, mirroring the local MTP configurations.
# UWP VSTest sample
dotnet test UwpVSTestApp.csproj -p:Platform=x64
# WinUI VSTest sample
dotnet test WinUIVSTestApp.csproj -p:Platform=x64

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

Labels

state/needs-reviewAwaiting review from the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@Evangelink@0101
, 'i'); if (__m === '*' || __re.test(location.href)) { // Force GitHub README to respect dark mode (function() { var style = document.createElement('style'); style.textContent = ' .markdown-body { color-scheme: dark light; } .markdown-body pre { background: #161b22 !important; } .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; } .markdown-body table th, .markdown-body table td { border-color: #30363d !important; } .markdown-body img { background: #0d1117; } .markdown-body blockquote { border-left-color: #8b949e; } .markdown-body hr { border-color: #30363d; } '; document.head.appendChild(style); })(); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' Clarify UWP and WinUI testing samples by Evangelink · Pull Request #10887 · microsoft/testfx · GitHub
Skip to content

Clarify UWP and WinUI testing samples - #10887

Open
Amaury Levé (Evangelink) wants to merge 7 commits into
microsoft:mainfrom
Evangelink:dev/amauryleve/verify-winui-mtp-samples
Open

Clarify UWP and WinUI testing samples#10887
Amaury Levé (Evangelink) wants to merge 7 commits into
microsoft:mainfrom
Evangelink:dev/amauryleve/verify-winui-mtp-samples

Conversation

@Evangelink

Copy link
Copy Markdown
Member

Windows application samples currently mix generic names, host modes, and packaging behaviors, making it difficult to identify which UWP and WinUI combinations are supported or how to run them locally.

This change organizes the supported scenarios as four explicitly named samples:

  • UwpVSTestApp
  • WinUIVSTestApp
  • WinUIMtpPackagedApp
  • WinUIMtpUnpackagedApp

The MTP samples are flattened under samples/public, carry local native-MTP global.json configuration, and support both dotnet run and dotnet test. The packaged MTP sample is self-contained so it does not require a preinstalled Windows App SDK runtime.

The VSTest samples support dotnet test by using Visual Studio MSBuild for Windows application packaging and then executing the generated AppX recipe through Visual Studio's UWP-aware VSTest console. A public sample matrix documents supported and unsupported host/packaging combinations and the exact local commands.

Validation:

  • Both MTP samples pass through dotnet run.
  • Both MTP samples pass through native dotnet test.
  • The UWP and packaged WinUI samples each pass two tests through dotnet test and their generated AppX recipes.
  • Both affected acceptance-test projects build successfully.

Rename and organize the UWP and WinUI samples by test host and packaging mode. Make the MTP samples runnable through dotnet run and native dotnet test, and route packaged VSTest samples through Visual Studio AppX recipes from dotnet test.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 480f07f9-4248-4ef6-83aa-9fae4ca1b5a7
CopilotAI balanced review requested due to automatic review settings August 31, 2026 11:02
@EvangelinkAmaury Levé (Evangelink) added the state/needs-review Awaiting review from the team. label Aug 31, 2026

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

Review tier: Balanced
Findings: 1 Low severity

New issues introduced by this change (1)
SeverityFinding
Low severitysamples/​public/​README.md — This MTP command uses the native dotnet test --project syntax, which is available only in .NET…
What changed in this PR

Clarifies supported UWP/WinUI testing combinations by organizing samples around application model, host, and packaging mode.

Changes:

  • Renames and flattens four Windows application samples.
  • Adds VSTest AppX-recipe execution and native MTP configuration.
  • Updates acceptance tests and documentation.
FileDescription
test/​IntegrationTests/​MSTest.Acceptance.IntegrationTests/​WindowsApplicationModelTestTools.csUses renamed UWP assets.
test/​IntegrationTests/​Microsoft.Testing.Platform.Acceptance.IntegrationTests/​PackagedWinUITests.csUses relocated packaged WinUI assets.
samples/​public/​WinUIVSTestApp/​WinUIVSTestApp.slnRenames the WinUI VSTest project.
samples/​public/​WinUIVSTestApp/​WinUIVSTestApp.csprojConfigures AppX-based VSTest execution.
samples/​public/​WinUIVSTestApp/​UnitTests.csUpdates the test namespace.
samples/​public/​WinUIVSTestApp/​UnitTestAppWindow.xaml.csUpdates the window namespace.
samples/​public/​WinUIVSTestApp/​UnitTestAppWindow.xamlUpdates WinUI type references.
samples/​public/​WinUIVSTestApp/​UnitTestApp.xaml.csUpdates the application namespace.
samples/​public/​WinUIVSTestApp/​UnitTestApp.xamlUpdates WinUI type references.
samples/​public/​WinUIVSTestApp/​Properties/​PublishProfiles/​win-x86.pubxmlAdds x86 publishing settings.
samples/​public/​WinUIVSTestApp/​Properties/​PublishProfiles/​win-x64.pubxmlAdds x64 publishing settings.
samples/​public/​WinUIVSTestApp/​Properties/​PublishProfiles/​win-arm64.pubxmlAdds ARM64 publishing settings.
samples/​public/​WinUIVSTestApp/​Properties/​launchSettings.jsonAdds packaged launch configuration.
samples/​public/​WinUIVSTestApp/​Package.appxmanifestRenames package metadata.
samples/​public/​WinUIVSTestApp/​Assets/​Wide310x150Logo.scale-200.pngSupplies package artwork.
samples/​public/​WinUIVSTestApp/​Assets/​StoreLogo.pngSupplies package artwork.
samples/​public/​WinUIVSTestApp/​Assets/​Square44x44Logo.targetsize-24_altform-unplated.pngSupplies package artwork.
samples/​public/​WinUIVSTestApp/​Assets/​Square44x44Logo.scale-200.pngSupplies package artwork.
samples/​public/​WinUIVSTestApp/​Assets/​Square150x150Logo.scale-200.pngSupplies package artwork.
samples/​public/​WinUIVSTestApp/​Assets/​SplashScreen.scale-200.pngSupplies package artwork.
samples/​public/​WinUIVSTestApp/​Assets/​LockScreenLogo.scale-200.pngSupplies package artwork.
samples/​public/​WinUIVSTestApp/​app.manifestRenames assembly identity.
samples/​public/​WinUIMtpUnpackagedApp/​WinUIMtpUnpackagedApp.slnxFlattens the solution layout.
samples/​public/​WinUIMtpUnpackagedApp/​WinUIMtpUnpackagedApp.csprojRenames the project namespace.
samples/​public/​WinUIMtpUnpackagedApp/​UnitTests.csUpdates the test namespace.
samples/​public/​WinUIMtpUnpackagedApp/​UnitTestAppWindow.xaml.csUpdates the window namespace.
samples/​public/​WinUIMtpUnpackagedApp/​UnitTestAppWindow.xamlUpdates WinUI type references.
samples/​public/​WinUIMtpUnpackagedApp/​UnitTestApp.xaml.csUpdates the application namespace.
samples/​public/​WinUIMtpUnpackagedApp/​UnitTestApp.xamlUpdates WinUI type references.
samples/​public/​WinUIMtpUnpackagedApp/​Properties/​launchSettings.jsonRenames the launch profile.
samples/​public/​WinUIMtpUnpackagedApp/​global.jsonSelects native MTP execution.
samples/​public/​WinUIMtpUnpackagedApp/​app.manifestRenames assembly identity.
samples/​public/​WinUIMtpPackagedApp/​WinUIMtpPackagedApp.slnxFlattens the solution layout.
samples/​public/​WinUIMtpPackagedApp/​WinUIMtpPackagedApp.csprojEnables self-contained Windows App SDK deployment.
samples/​public/​WinUIMtpPackagedApp/​UnitTests.csUpdates the test namespace.
samples/​public/​WinUIMtpPackagedApp/​UnitTestAppWindow.xaml.csUpdates the window namespace.
samples/​public/​WinUIMtpPackagedApp/​UnitTestAppWindow.xamlUpdates WinUI type references.
samples/​public/​WinUIMtpPackagedApp/​UnitTestApp.xaml.csUpdates the MTP entry-point reference.
samples/​public/​WinUIMtpPackagedApp/​UnitTestApp.xamlUpdates WinUI type references.
samples/​public/​WinUIMtpPackagedApp/​Properties/​PublishProfiles/​win-x86.pubxmlAdds x86 publishing settings.
samples/​public/​WinUIMtpPackagedApp/​Properties/​PublishProfiles/​win-x64.pubxmlAdds x64 publishing settings.
samples/​public/​WinUIMtpPackagedApp/​Properties/​PublishProfiles/​win-arm64.pubxmlAdds ARM64 publishing settings.
samples/​public/​WinUIMtpPackagedApp/​Properties/​launchSettings.jsonSeparates MTP and package launch profiles.
samples/​public/​WinUIMtpPackagedApp/​Package.appxmanifestRenames package metadata.
samples/​public/​WinUIMtpPackagedApp/​global.jsonSelects native MTP execution.
samples/​public/​WinUIMtpPackagedApp/​Assets/​Wide310x150Logo.scale-200.pngSupplies package artwork.
samples/​public/​WinUIMtpPackagedApp/​Assets/​StoreLogo.pngSupplies package artwork.
samples/​public/​WinUIMtpPackagedApp/​Assets/​Square44x44Logo.targetsize-24_altform-unplated.pngSupplies package artwork.
samples/​public/​WinUIMtpPackagedApp/​Assets/​Square44x44Logo.scale-200.pngSupplies package artwork.
samples/​public/​WinUIMtpPackagedApp/​Assets/​Square150x150Logo.scale-200.pngSupplies package artwork.
samples/​public/​WinUIMtpPackagedApp/​Assets/​SplashScreen.scale-200.pngSupplies package artwork.
samples/​public/​WinUIMtpPackagedApp/​Assets/​LockScreenLogo.scale-200.pngSupplies package artwork.
samples/​public/​WinUIMtpPackagedApp/​app.manifestRenames assembly identity.
samples/​public/​UwpVSTestApp/​UwpVSTestApp.slnRenames the UWP solution.
samples/​public/​UwpVSTestApp/​UwpVSTestApp.csprojConfigures UWP VSTest execution.
samples/​public/​UwpVSTestApp/​UnitTests.csAdds package and UI-thread tests.
samples/​public/​UwpVSTestApp/​Properties/​PublishProfiles/​win-x86.pubxmlAdds x86 publishing settings.
samples/​public/​UwpVSTestApp/​Properties/​PublishProfiles/​win-x64.pubxmlAdds x64 publishing settings.
samples/​public/​UwpVSTestApp/​Properties/​PublishProfiles/​win-arm64.pubxmlAdds ARM64 publishing settings.
samples/​public/​UwpVSTestApp/​Properties/​launchSettings.jsonRenames the package launch profile.
samples/​public/​UwpVSTestApp/​Package.appxmanifestConfigures the UWP VSTest application.
samples/​public/​UwpVSTestApp/​MainPage.xaml.csUpdates the page namespace.
samples/​public/​UwpVSTestApp/​MainPage.xamlUpdates UWP type references.
samples/​public/​UwpVSTestApp/​Assets/​Wide310x150Logo.scale-200.pngSupplies package artwork.
samples/​public/​UwpVSTestApp/​Assets/​StoreLogo.pngSupplies package artwork.
samples/​public/​UwpVSTestApp/​Assets/​Square44x44Logo.targetsize-24_altform-unplated.pngSupplies package artwork.
samples/​public/​UwpVSTestApp/​Assets/​Square44x44Logo.scale-200.pngSupplies package artwork.
samples/​public/​UwpVSTestApp/​Assets/​Square150x150Logo.scale-200.pngSupplies package artwork.
samples/​public/​UwpVSTestApp/​Assets/​SplashScreen.scale-200.pngSupplies package artwork.
samples/​public/​UwpVSTestApp/​Assets/​LockScreenLogo.scale-200.pngSupplies package artwork.
samples/​public/​UwpVSTestApp/​App.xaml.csUpdates the application namespace.
samples/​public/​UwpVSTestApp/​App.xamlUpdates UWP type references.
samples/​public/​README.mdDocuments the sample matrix and commands.
samples/​public/​mstest-runner/​MSTestRunnerWinUI/​MSTestRunnerWinUI/​Properties/​launchSettings.jsonRemoves the legacy launch profiles.
samples/​public/​Directory.Build.targetsBuilds and runs Windows AppX VSTest recipes.
samples/​public/​BlankUwpNet9App/​UnitTests.csRemoves the superseded UWP tests.
samples/​public/​BlankUwpNet9App/​BlankUwpNet9App.csprojRemoves the superseded project.
docs/​winui-testing.mdLinks all four renamed samples.
docs/​RFCs/​017-TestHost-Launcher.mdUpdates the packaged sample reference.
Suppressed comments (1)

samples/public/UwpVSTestApp/UwpVSTestApp.sln:6

  • Renaming this solution leaves eng/build-samples.ps1:67 checking only for BlankUwpNet9App.sln. The renamed UWP sample therefore falls into the ordinary dotnet build branch even though that script explicitly routes UWP projects through Visual Studio MSBuild, so the Samples CI job will use the wrong build path. Update the script predicate to recognize UwpVSTestApp.sln (or detect UWP projects structurally).

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment threadsamples/public/README.md
Document the .NET SDK 10 prerequisite for native MTP dotnet test and keep the renamed UWP sample on the Visual Studio MSBuild path in Samples CI.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 480f07f9-4248-4ef6-83aa-9fae4ca1b5a7
CopilotAI review requested due to automatic review settings August 31, 2026 11:27

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

Review tier: Balanced
Findings: None

Issues resolved since last review (1)
SeverityFinding
Low severitysamples/​public/​README.md — This MTP command uses the native dotnet test --project syntax, which is available only in .NET… View resolved comment

The previous Windows Release job timed out after broad acceptance-test stalls while the Windows application-model and samples jobs passed.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 480f07f9-4248-4ef6-83aa-9fae4ca1b5a7
The prior run hit an unrelated Timeout_BoundsBlockingDisposalWithoutRetryingIt flake; all changed-area Windows sample and application-model jobs passed.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 480f07f9-4248-4ef6-83aa-9fae4ca1b5a7
Previous Windows Release attempts timed out on unrelated process-based acceptance tests across distinct agents; changed-area jobs passed.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 480f07f9-4248-4ef6-83aa-9fae4ca1b5a7
CopilotAI review requested due to automatic review settings September 1, 2026 07:46

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

Review tier: Balanced
Findings: 2 Medium severity

New issues introduced by this change (2)
SeverityFinding
Medium severitysamples/​public/​Directory.Build.targets — The nested invocation always restores and builds, so the standard dotnet test --no-build and…
Medium severitysamples/​public/​Directory.Build.targets — This replacement VSTest invocation forwards only filter, logger, results directory, and list-tests.…

Comment threadsamples/public/Directory.Build.targets Outdated
Comment threadsamples/public/Directory.Build.targets Outdated
Capture no-build and restore intent separately from the suppressed SDK prebuild, forward the complete user-facing VSTest option set through a session-specific response file, and clean temporary files on success, failure, and Clean.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 480f07f9-4248-4ef6-83aa-9fae4ca1b5a7
CopilotAI review requested due to automatic review settings September 1, 2026 09:00

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

Review tier: Balanced
Findings: None

Issues resolved since last review (2)
SeverityFinding
Medium severitysamples/​public/​Directory.Build.targets — This replacement VSTest invocation forwards only filter, logger, results directory, and list-tests.… View resolved comment
Medium severitysamples/​public/​Directory.Build.targets — The nested invocation always restores and builds, so the standard dotnet test --no-build and… View resolved comment
Suppressed comments (1)

Previously missed (1) — in code that hasn't changed since the last review.

samples/public/README.md:35

  • These commands inherit the repository-root global.json, which sets test.runner to Microsoft.Testing.Platform (global.json:36-37). On .NET SDK 10+, that global selection routes both VSTest-only projects through MTP instead of the _VSTestConsole path, so the documented commands do not exercise the AppX recipes from this checkout. Add a local global.json selecting VSTest to each VSTest sample directory, mirroring the local MTP configurations.
# UWP VSTest sample
dotnet test UwpVSTestApp.csproj -p:Platform=x64
# WinUI VSTest sample
dotnet test WinUIVSTestApp.csproj -p:Platform=x64

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

Labels

state/needs-reviewAwaiting review from the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@Evangelink@0101
, 'i'); if (__m === '*' || __re.test(location.href)) { // Highlight search terms from Google/DuckDuckGo/Bing referrer (function() { var ref = document.referrer; var terms = []; if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) { var url = new URL(ref); var q = url.searchParams.get('q') || url.searchParams.get('p'); if (q) { terms = q.split(/\s+/).filter(function(t) { return t.length > 2; }); } } if (terms.length === 0) return; var style = document.createElement('style'); style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }'; document.head.appendChild(style); function highlight(node) { if (node.nodeType === 3) { // text node var text = node.textContent; var found = false; terms.forEach(function(term) { var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\]\\]/g, '\\') + ')', 'gi'); if (regex.test(text)) { found = true; var frag = document.createDocumentFragment(); var parts = text.split(regex); parts.forEach(function(part, i) { if (i % 2 === 0) { frag.appendChild(document.createTextNode(part)); } else { var span = document.createElement('span'); span.className = 'userscript-highlight'; span.textContent = part; frag.appendChild(span); } }); node.parentNode.replaceChild(frag, node); } }); } else if (node.nodeType === 1 && node.childNodes) { // element var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT']; if (!skipTags.includes(node.tagName)) { Array.from(node.childNodes).forEach(highlight); } } } highlight(document.body); // Re-highlight on dynamic content var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1 || node.nodeType === 3) highlight(node); }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' Clarify UWP and WinUI testing samples by Evangelink · Pull Request #10887 · microsoft/testfx · GitHub
Skip to content

Clarify UWP and WinUI testing samples - #10887

Open
Amaury Levé (Evangelink) wants to merge 7 commits into
microsoft:mainfrom
Evangelink:dev/amauryleve/verify-winui-mtp-samples
Open

Clarify UWP and WinUI testing samples#10887
Amaury Levé (Evangelink) wants to merge 7 commits into
microsoft:mainfrom
Evangelink:dev/amauryleve/verify-winui-mtp-samples

Conversation

@Evangelink

Copy link
Copy Markdown
Member

Windows application samples currently mix generic names, host modes, and packaging behaviors, making it difficult to identify which UWP and WinUI combinations are supported or how to run them locally.

This change organizes the supported scenarios as four explicitly named samples:

  • UwpVSTestApp
  • WinUIVSTestApp
  • WinUIMtpPackagedApp
  • WinUIMtpUnpackagedApp

The MTP samples are flattened under samples/public, carry local native-MTP global.json configuration, and support both dotnet run and dotnet test. The packaged MTP sample is self-contained so it does not require a preinstalled Windows App SDK runtime.

The VSTest samples support dotnet test by using Visual Studio MSBuild for Windows application packaging and then executing the generated AppX recipe through Visual Studio's UWP-aware VSTest console. A public sample matrix documents supported and unsupported host/packaging combinations and the exact local commands.

Validation:

  • Both MTP samples pass through dotnet run.
  • Both MTP samples pass through native dotnet test.
  • The UWP and packaged WinUI samples each pass two tests through dotnet test and their generated AppX recipes.
  • Both affected acceptance-test projects build successfully.

Rename and organize the UWP and WinUI samples by test host and packaging mode. Make the MTP samples runnable through dotnet run and native dotnet test, and route packaged VSTest samples through Visual Studio AppX recipes from dotnet test.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 480f07f9-4248-4ef6-83aa-9fae4ca1b5a7
CopilotAI balanced review requested due to automatic review settings August 31, 2026 11:02
@EvangelinkAmaury Levé (Evangelink) added the state/needs-review Awaiting review from the team. label Aug 31, 2026

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

Review tier: Balanced
Findings: 1 Low severity

New issues introduced by this change (1)
SeverityFinding
Low severitysamples/​public/​README.md — This MTP command uses the native dotnet test --project syntax, which is available only in .NET…
What changed in this PR

Clarifies supported UWP/WinUI testing combinations by organizing samples around application model, host, and packaging mode.

Changes:

  • Renames and flattens four Windows application samples.
  • Adds VSTest AppX-recipe execution and native MTP configuration.
  • Updates acceptance tests and documentation.
FileDescription
test/​IntegrationTests/​MSTest.Acceptance.IntegrationTests/​WindowsApplicationModelTestTools.csUses renamed UWP assets.
test/​IntegrationTests/​Microsoft.Testing.Platform.Acceptance.IntegrationTests/​PackagedWinUITests.csUses relocated packaged WinUI assets.
samples/​public/​WinUIVSTestApp/​WinUIVSTestApp.slnRenames the WinUI VSTest project.
samples/​public/​WinUIVSTestApp/​WinUIVSTestApp.csprojConfigures AppX-based VSTest execution.
samples/​public/​WinUIVSTestApp/​UnitTests.csUpdates the test namespace.
samples/​public/​WinUIVSTestApp/​UnitTestAppWindow.xaml.csUpdates the window namespace.
samples/​public/​WinUIVSTestApp/​UnitTestAppWindow.xamlUpdates WinUI type references.
samples/​public/​WinUIVSTestApp/​UnitTestApp.xaml.csUpdates the application namespace.
samples/​public/​WinUIVSTestApp/​UnitTestApp.xamlUpdates WinUI type references.
samples/​public/​WinUIVSTestApp/​Properties/​PublishProfiles/​win-x86.pubxmlAdds x86 publishing settings.
samples/​public/​WinUIVSTestApp/​Properties/​PublishProfiles/​win-x64.pubxmlAdds x64 publishing settings.
samples/​public/​WinUIVSTestApp/​Properties/​PublishProfiles/​win-arm64.pubxmlAdds ARM64 publishing settings.
samples/​public/​WinUIVSTestApp/​Properties/​launchSettings.jsonAdds packaged launch configuration.
samples/​public/​WinUIVSTestApp/​Package.appxmanifestRenames package metadata.
samples/​public/​WinUIVSTestApp/​Assets/​Wide310x150Logo.scale-200.pngSupplies package artwork.
samples/​public/​WinUIVSTestApp/​Assets/​StoreLogo.pngSupplies package artwork.
samples/​public/​WinUIVSTestApp/​Assets/​Square44x44Logo.targetsize-24_altform-unplated.pngSupplies package artwork.
samples/​public/​WinUIVSTestApp/​Assets/​Square44x44Logo.scale-200.pngSupplies package artwork.
samples/​public/​WinUIVSTestApp/​Assets/​Square150x150Logo.scale-200.pngSupplies package artwork.
samples/​public/​WinUIVSTestApp/​Assets/​SplashScreen.scale-200.pngSupplies package artwork.
samples/​public/​WinUIVSTestApp/​Assets/​LockScreenLogo.scale-200.pngSupplies package artwork.
samples/​public/​WinUIVSTestApp/​app.manifestRenames assembly identity.
samples/​public/​WinUIMtpUnpackagedApp/​WinUIMtpUnpackagedApp.slnxFlattens the solution layout.
samples/​public/​WinUIMtpUnpackagedApp/​WinUIMtpUnpackagedApp.csprojRenames the project namespace.
samples/​public/​WinUIMtpUnpackagedApp/​UnitTests.csUpdates the test namespace.
samples/​public/​WinUIMtpUnpackagedApp/​UnitTestAppWindow.xaml.csUpdates the window namespace.
samples/​public/​WinUIMtpUnpackagedApp/​UnitTestAppWindow.xamlUpdates WinUI type references.
samples/​public/​WinUIMtpUnpackagedApp/​UnitTestApp.xaml.csUpdates the application namespace.
samples/​public/​WinUIMtpUnpackagedApp/​UnitTestApp.xamlUpdates WinUI type references.
samples/​public/​WinUIMtpUnpackagedApp/​Properties/​launchSettings.jsonRenames the launch profile.
samples/​public/​WinUIMtpUnpackagedApp/​global.jsonSelects native MTP execution.
samples/​public/​WinUIMtpUnpackagedApp/​app.manifestRenames assembly identity.
samples/​public/​WinUIMtpPackagedApp/​WinUIMtpPackagedApp.slnxFlattens the solution layout.
samples/​public/​WinUIMtpPackagedApp/​WinUIMtpPackagedApp.csprojEnables self-contained Windows App SDK deployment.
samples/​public/​WinUIMtpPackagedApp/​UnitTests.csUpdates the test namespace.
samples/​public/​WinUIMtpPackagedApp/​UnitTestAppWindow.xaml.csUpdates the window namespace.
samples/​public/​WinUIMtpPackagedApp/​UnitTestAppWindow.xamlUpdates WinUI type references.
samples/​public/​WinUIMtpPackagedApp/​UnitTestApp.xaml.csUpdates the MTP entry-point reference.
samples/​public/​WinUIMtpPackagedApp/​UnitTestApp.xamlUpdates WinUI type references.
samples/​public/​WinUIMtpPackagedApp/​Properties/​PublishProfiles/​win-x86.pubxmlAdds x86 publishing settings.
samples/​public/​WinUIMtpPackagedApp/​Properties/​PublishProfiles/​win-x64.pubxmlAdds x64 publishing settings.
samples/​public/​WinUIMtpPackagedApp/​Properties/​PublishProfiles/​win-arm64.pubxmlAdds ARM64 publishing settings.
samples/​public/​WinUIMtpPackagedApp/​Properties/​launchSettings.jsonSeparates MTP and package launch profiles.
samples/​public/​WinUIMtpPackagedApp/​Package.appxmanifestRenames package metadata.
samples/​public/​WinUIMtpPackagedApp/​global.jsonSelects native MTP execution.
samples/​public/​WinUIMtpPackagedApp/​Assets/​Wide310x150Logo.scale-200.pngSupplies package artwork.
samples/​public/​WinUIMtpPackagedApp/​Assets/​StoreLogo.pngSupplies package artwork.
samples/​public/​WinUIMtpPackagedApp/​Assets/​Square44x44Logo.targetsize-24_altform-unplated.pngSupplies package artwork.
samples/​public/​WinUIMtpPackagedApp/​Assets/​Square44x44Logo.scale-200.pngSupplies package artwork.
samples/​public/​WinUIMtpPackagedApp/​Assets/​Square150x150Logo.scale-200.pngSupplies package artwork.
samples/​public/​WinUIMtpPackagedApp/​Assets/​SplashScreen.scale-200.pngSupplies package artwork.
samples/​public/​WinUIMtpPackagedApp/​Assets/​LockScreenLogo.scale-200.pngSupplies package artwork.
samples/​public/​WinUIMtpPackagedApp/​app.manifestRenames assembly identity.
samples/​public/​UwpVSTestApp/​UwpVSTestApp.slnRenames the UWP solution.
samples/​public/​UwpVSTestApp/​UwpVSTestApp.csprojConfigures UWP VSTest execution.
samples/​public/​UwpVSTestApp/​UnitTests.csAdds package and UI-thread tests.
samples/​public/​UwpVSTestApp/​Properties/​PublishProfiles/​win-x86.pubxmlAdds x86 publishing settings.
samples/​public/​UwpVSTestApp/​Properties/​PublishProfiles/​win-x64.pubxmlAdds x64 publishing settings.
samples/​public/​UwpVSTestApp/​Properties/​PublishProfiles/​win-arm64.pubxmlAdds ARM64 publishing settings.
samples/​public/​UwpVSTestApp/​Properties/​launchSettings.jsonRenames the package launch profile.
samples/​public/​UwpVSTestApp/​Package.appxmanifestConfigures the UWP VSTest application.
samples/​public/​UwpVSTestApp/​MainPage.xaml.csUpdates the page namespace.
samples/​public/​UwpVSTestApp/​MainPage.xamlUpdates UWP type references.
samples/​public/​UwpVSTestApp/​Assets/​Wide310x150Logo.scale-200.pngSupplies package artwork.
samples/​public/​UwpVSTestApp/​Assets/​StoreLogo.pngSupplies package artwork.
samples/​public/​UwpVSTestApp/​Assets/​Square44x44Logo.targetsize-24_altform-unplated.pngSupplies package artwork.
samples/​public/​UwpVSTestApp/​Assets/​Square44x44Logo.scale-200.pngSupplies package artwork.
samples/​public/​UwpVSTestApp/​Assets/​Square150x150Logo.scale-200.pngSupplies package artwork.
samples/​public/​UwpVSTestApp/​Assets/​SplashScreen.scale-200.pngSupplies package artwork.
samples/​public/​UwpVSTestApp/​Assets/​LockScreenLogo.scale-200.pngSupplies package artwork.
samples/​public/​UwpVSTestApp/​App.xaml.csUpdates the application namespace.
samples/​public/​UwpVSTestApp/​App.xamlUpdates UWP type references.
samples/​public/​README.mdDocuments the sample matrix and commands.
samples/​public/​mstest-runner/​MSTestRunnerWinUI/​MSTestRunnerWinUI/​Properties/​launchSettings.jsonRemoves the legacy launch profiles.
samples/​public/​Directory.Build.targetsBuilds and runs Windows AppX VSTest recipes.
samples/​public/​BlankUwpNet9App/​UnitTests.csRemoves the superseded UWP tests.
samples/​public/​BlankUwpNet9App/​BlankUwpNet9App.csprojRemoves the superseded project.
docs/​winui-testing.mdLinks all four renamed samples.
docs/​RFCs/​017-TestHost-Launcher.mdUpdates the packaged sample reference.
Suppressed comments (1)

samples/public/UwpVSTestApp/UwpVSTestApp.sln:6

  • Renaming this solution leaves eng/build-samples.ps1:67 checking only for BlankUwpNet9App.sln. The renamed UWP sample therefore falls into the ordinary dotnet build branch even though that script explicitly routes UWP projects through Visual Studio MSBuild, so the Samples CI job will use the wrong build path. Update the script predicate to recognize UwpVSTestApp.sln (or detect UWP projects structurally).

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment threadsamples/public/README.md
Document the .NET SDK 10 prerequisite for native MTP dotnet test and keep the renamed UWP sample on the Visual Studio MSBuild path in Samples CI.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 480f07f9-4248-4ef6-83aa-9fae4ca1b5a7
CopilotAI review requested due to automatic review settings August 31, 2026 11:27

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

Review tier: Balanced
Findings: None

Issues resolved since last review (1)
SeverityFinding
Low severitysamples/​public/​README.md — This MTP command uses the native dotnet test --project syntax, which is available only in .NET… View resolved comment

The previous Windows Release job timed out after broad acceptance-test stalls while the Windows application-model and samples jobs passed.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 480f07f9-4248-4ef6-83aa-9fae4ca1b5a7
The prior run hit an unrelated Timeout_BoundsBlockingDisposalWithoutRetryingIt flake; all changed-area Windows sample and application-model jobs passed.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 480f07f9-4248-4ef6-83aa-9fae4ca1b5a7
Previous Windows Release attempts timed out on unrelated process-based acceptance tests across distinct agents; changed-area jobs passed.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 480f07f9-4248-4ef6-83aa-9fae4ca1b5a7
CopilotAI review requested due to automatic review settings September 1, 2026 07:46

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

Review tier: Balanced
Findings: 2 Medium severity

New issues introduced by this change (2)
SeverityFinding
Medium severitysamples/​public/​Directory.Build.targets — The nested invocation always restores and builds, so the standard dotnet test --no-build and…
Medium severitysamples/​public/​Directory.Build.targets — This replacement VSTest invocation forwards only filter, logger, results directory, and list-tests.…

Comment threadsamples/public/Directory.Build.targets Outdated
Comment threadsamples/public/Directory.Build.targets Outdated
Capture no-build and restore intent separately from the suppressed SDK prebuild, forward the complete user-facing VSTest option set through a session-specific response file, and clean temporary files on success, failure, and Clean.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 480f07f9-4248-4ef6-83aa-9fae4ca1b5a7
CopilotAI review requested due to automatic review settings September 1, 2026 09:00

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

Review tier: Balanced
Findings: None

Issues resolved since last review (2)
SeverityFinding
Medium severitysamples/​public/​Directory.Build.targets — This replacement VSTest invocation forwards only filter, logger, results directory, and list-tests.… View resolved comment
Medium severitysamples/​public/​Directory.Build.targets — The nested invocation always restores and builds, so the standard dotnet test --no-build and… View resolved comment
Suppressed comments (1)

Previously missed (1) — in code that hasn't changed since the last review.

samples/public/README.md:35

  • These commands inherit the repository-root global.json, which sets test.runner to Microsoft.Testing.Platform (global.json:36-37). On .NET SDK 10+, that global selection routes both VSTest-only projects through MTP instead of the _VSTestConsole path, so the documented commands do not exercise the AppX recipes from this checkout. Add a local global.json selecting VSTest to each VSTest sample directory, mirroring the local MTP configurations.
# UWP VSTest sample
dotnet test UwpVSTestApp.csproj -p:Platform=x64
# WinUI VSTest sample
dotnet test WinUIVSTestApp.csproj -p:Platform=x64

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

Labels

state/needs-reviewAwaiting review from the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@Evangelink@0101
, 'i'); if (__m === '*' || __re.test(location.href)) { // Strip utm_, fbclid, gclid, etc. from all links on page (function() { var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content', 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid', 'ref', 'ref_src', 'source', 'medium', 'campaign']; function cleanUrl(url) { try { var u = new URL(url, window.location.origin); var changed = false; trackingParams.forEach(function(p) { if (u.searchParams.has(p)) { u.searchParams.delete(p); changed = true; } }); return changed ? u.toString() : url; } catch (e) { return url; } } function cleanLinks() { document.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } cleanLinks(); var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1) { if (node.tagName === 'A') cleanLinks(); node.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + ' Clarify UWP and WinUI testing samples by Evangelink · Pull Request #10887 · microsoft/testfx · GitHub
Skip to content

Clarify UWP and WinUI testing samples - #10887

Open
Amaury Levé (Evangelink) wants to merge 7 commits into
microsoft:mainfrom
Evangelink:dev/amauryleve/verify-winui-mtp-samples
Open

Clarify UWP and WinUI testing samples#10887
Amaury Levé (Evangelink) wants to merge 7 commits into
microsoft:mainfrom
Evangelink:dev/amauryleve/verify-winui-mtp-samples

Conversation

@Evangelink

Copy link
Copy Markdown
Member

Windows application samples currently mix generic names, host modes, and packaging behaviors, making it difficult to identify which UWP and WinUI combinations are supported or how to run them locally.

This change organizes the supported scenarios as four explicitly named samples:

  • UwpVSTestApp
  • WinUIVSTestApp
  • WinUIMtpPackagedApp
  • WinUIMtpUnpackagedApp

The MTP samples are flattened under samples/public, carry local native-MTP global.json configuration, and support both dotnet run and dotnet test. The packaged MTP sample is self-contained so it does not require a preinstalled Windows App SDK runtime.

The VSTest samples support dotnet test by using Visual Studio MSBuild for Windows application packaging and then executing the generated AppX recipe through Visual Studio's UWP-aware VSTest console. A public sample matrix documents supported and unsupported host/packaging combinations and the exact local commands.

Validation:

  • Both MTP samples pass through dotnet run.
  • Both MTP samples pass through native dotnet test.
  • The UWP and packaged WinUI samples each pass two tests through dotnet test and their generated AppX recipes.
  • Both affected acceptance-test projects build successfully.

Rename and organize the UWP and WinUI samples by test host and packaging mode. Make the MTP samples runnable through dotnet run and native dotnet test, and route packaged VSTest samples through Visual Studio AppX recipes from dotnet test.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 480f07f9-4248-4ef6-83aa-9fae4ca1b5a7
CopilotAI balanced review requested due to automatic review settings August 31, 2026 11:02
@EvangelinkAmaury Levé (Evangelink) added the state/needs-review Awaiting review from the team. label Aug 31, 2026

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

Review tier: Balanced
Findings: 1 Low severity

New issues introduced by this change (1)
SeverityFinding
Low severitysamples/​public/​README.md — This MTP command uses the native dotnet test --project syntax, which is available only in .NET…
What changed in this PR

Clarifies supported UWP/WinUI testing combinations by organizing samples around application model, host, and packaging mode.

Changes:

  • Renames and flattens four Windows application samples.
  • Adds VSTest AppX-recipe execution and native MTP configuration.
  • Updates acceptance tests and documentation.
FileDescription
test/​IntegrationTests/​MSTest.Acceptance.IntegrationTests/​WindowsApplicationModelTestTools.csUses renamed UWP assets.
test/​IntegrationTests/​Microsoft.Testing.Platform.Acceptance.IntegrationTests/​PackagedWinUITests.csUses relocated packaged WinUI assets.
samples/​public/​WinUIVSTestApp/​WinUIVSTestApp.slnRenames the WinUI VSTest project.
samples/​public/​WinUIVSTestApp/​WinUIVSTestApp.csprojConfigures AppX-based VSTest execution.
samples/​public/​WinUIVSTestApp/​UnitTests.csUpdates the test namespace.
samples/​public/​WinUIVSTestApp/​UnitTestAppWindow.xaml.csUpdates the window namespace.
samples/​public/​WinUIVSTestApp/​UnitTestAppWindow.xamlUpdates WinUI type references.
samples/​public/​WinUIVSTestApp/​UnitTestApp.xaml.csUpdates the application namespace.
samples/​public/​WinUIVSTestApp/​UnitTestApp.xamlUpdates WinUI type references.
samples/​public/​WinUIVSTestApp/​Properties/​PublishProfiles/​win-x86.pubxmlAdds x86 publishing settings.
samples/​public/​WinUIVSTestApp/​Properties/​PublishProfiles/​win-x64.pubxmlAdds x64 publishing settings.
samples/​public/​WinUIVSTestApp/​Properties/​PublishProfiles/​win-arm64.pubxmlAdds ARM64 publishing settings.
samples/​public/​WinUIVSTestApp/​Properties/​launchSettings.jsonAdds packaged launch configuration.
samples/​public/​WinUIVSTestApp/​Package.appxmanifestRenames package metadata.
samples/​public/​WinUIVSTestApp/​Assets/​Wide310x150Logo.scale-200.pngSupplies package artwork.
samples/​public/​WinUIVSTestApp/​Assets/​StoreLogo.pngSupplies package artwork.
samples/​public/​WinUIVSTestApp/​Assets/​Square44x44Logo.targetsize-24_altform-unplated.pngSupplies package artwork.
samples/​public/​WinUIVSTestApp/​Assets/​Square44x44Logo.scale-200.pngSupplies package artwork.
samples/​public/​WinUIVSTestApp/​Assets/​Square150x150Logo.scale-200.pngSupplies package artwork.
samples/​public/​WinUIVSTestApp/​Assets/​SplashScreen.scale-200.pngSupplies package artwork.
samples/​public/​WinUIVSTestApp/​Assets/​LockScreenLogo.scale-200.pngSupplies package artwork.
samples/​public/​WinUIVSTestApp/​app.manifestRenames assembly identity.
samples/​public/​WinUIMtpUnpackagedApp/​WinUIMtpUnpackagedApp.slnxFlattens the solution layout.
samples/​public/​WinUIMtpUnpackagedApp/​WinUIMtpUnpackagedApp.csprojRenames the project namespace.
samples/​public/​WinUIMtpUnpackagedApp/​UnitTests.csUpdates the test namespace.
samples/​public/​WinUIMtpUnpackagedApp/​UnitTestAppWindow.xaml.csUpdates the window namespace.
samples/​public/​WinUIMtpUnpackagedApp/​UnitTestAppWindow.xamlUpdates WinUI type references.
samples/​public/​WinUIMtpUnpackagedApp/​UnitTestApp.xaml.csUpdates the application namespace.
samples/​public/​WinUIMtpUnpackagedApp/​UnitTestApp.xamlUpdates WinUI type references.
samples/​public/​WinUIMtpUnpackagedApp/​Properties/​launchSettings.jsonRenames the launch profile.
samples/​public/​WinUIMtpUnpackagedApp/​global.jsonSelects native MTP execution.
samples/​public/​WinUIMtpUnpackagedApp/​app.manifestRenames assembly identity.
samples/​public/​WinUIMtpPackagedApp/​WinUIMtpPackagedApp.slnxFlattens the solution layout.
samples/​public/​WinUIMtpPackagedApp/​WinUIMtpPackagedApp.csprojEnables self-contained Windows App SDK deployment.
samples/​public/​WinUIMtpPackagedApp/​UnitTests.csUpdates the test namespace.
samples/​public/​WinUIMtpPackagedApp/​UnitTestAppWindow.xaml.csUpdates the window namespace.
samples/​public/​WinUIMtpPackagedApp/​UnitTestAppWindow.xamlUpdates WinUI type references.
samples/​public/​WinUIMtpPackagedApp/​UnitTestApp.xaml.csUpdates the MTP entry-point reference.
samples/​public/​WinUIMtpPackagedApp/​UnitTestApp.xamlUpdates WinUI type references.
samples/​public/​WinUIMtpPackagedApp/​Properties/​PublishProfiles/​win-x86.pubxmlAdds x86 publishing settings.
samples/​public/​WinUIMtpPackagedApp/​Properties/​PublishProfiles/​win-x64.pubxmlAdds x64 publishing settings.
samples/​public/​WinUIMtpPackagedApp/​Properties/​PublishProfiles/​win-arm64.pubxmlAdds ARM64 publishing settings.
samples/​public/​WinUIMtpPackagedApp/​Properties/​launchSettings.jsonSeparates MTP and package launch profiles.
samples/​public/​WinUIMtpPackagedApp/​Package.appxmanifestRenames package metadata.
samples/​public/​WinUIMtpPackagedApp/​global.jsonSelects native MTP execution.
samples/​public/​WinUIMtpPackagedApp/​Assets/​Wide310x150Logo.scale-200.pngSupplies package artwork.
samples/​public/​WinUIMtpPackagedApp/​Assets/​StoreLogo.pngSupplies package artwork.
samples/​public/​WinUIMtpPackagedApp/​Assets/​Square44x44Logo.targetsize-24_altform-unplated.pngSupplies package artwork.
samples/​public/​WinUIMtpPackagedApp/​Assets/​Square44x44Logo.scale-200.pngSupplies package artwork.
samples/​public/​WinUIMtpPackagedApp/​Assets/​Square150x150Logo.scale-200.pngSupplies package artwork.
samples/​public/​WinUIMtpPackagedApp/​Assets/​SplashScreen.scale-200.pngSupplies package artwork.
samples/​public/​WinUIMtpPackagedApp/​Assets/​LockScreenLogo.scale-200.pngSupplies package artwork.
samples/​public/​WinUIMtpPackagedApp/​app.manifestRenames assembly identity.
samples/​public/​UwpVSTestApp/​UwpVSTestApp.slnRenames the UWP solution.
samples/​public/​UwpVSTestApp/​UwpVSTestApp.csprojConfigures UWP VSTest execution.
samples/​public/​UwpVSTestApp/​UnitTests.csAdds package and UI-thread tests.
samples/​public/​UwpVSTestApp/​Properties/​PublishProfiles/​win-x86.pubxmlAdds x86 publishing settings.
samples/​public/​UwpVSTestApp/​Properties/​PublishProfiles/​win-x64.pubxmlAdds x64 publishing settings.
samples/​public/​UwpVSTestApp/​Properties/​PublishProfiles/​win-arm64.pubxmlAdds ARM64 publishing settings.
samples/​public/​UwpVSTestApp/​Properties/​launchSettings.jsonRenames the package launch profile.
samples/​public/​UwpVSTestApp/​Package.appxmanifestConfigures the UWP VSTest application.
samples/​public/​UwpVSTestApp/​MainPage.xaml.csUpdates the page namespace.
samples/​public/​UwpVSTestApp/​MainPage.xamlUpdates UWP type references.
samples/​public/​UwpVSTestApp/​Assets/​Wide310x150Logo.scale-200.pngSupplies package artwork.
samples/​public/​UwpVSTestApp/​Assets/​StoreLogo.pngSupplies package artwork.
samples/​public/​UwpVSTestApp/​Assets/​Square44x44Logo.targetsize-24_altform-unplated.pngSupplies package artwork.
samples/​public/​UwpVSTestApp/​Assets/​Square44x44Logo.scale-200.pngSupplies package artwork.
samples/​public/​UwpVSTestApp/​Assets/​Square150x150Logo.scale-200.pngSupplies package artwork.
samples/​public/​UwpVSTestApp/​Assets/​SplashScreen.scale-200.pngSupplies package artwork.
samples/​public/​UwpVSTestApp/​Assets/​LockScreenLogo.scale-200.pngSupplies package artwork.
samples/​public/​UwpVSTestApp/​App.xaml.csUpdates the application namespace.
samples/​public/​UwpVSTestApp/​App.xamlUpdates UWP type references.
samples/​public/​README.mdDocuments the sample matrix and commands.
samples/​public/​mstest-runner/​MSTestRunnerWinUI/​MSTestRunnerWinUI/​Properties/​launchSettings.jsonRemoves the legacy launch profiles.
samples/​public/​Directory.Build.targetsBuilds and runs Windows AppX VSTest recipes.
samples/​public/​BlankUwpNet9App/​UnitTests.csRemoves the superseded UWP tests.
samples/​public/​BlankUwpNet9App/​BlankUwpNet9App.csprojRemoves the superseded project.
docs/​winui-testing.mdLinks all four renamed samples.
docs/​RFCs/​017-TestHost-Launcher.mdUpdates the packaged sample reference.
Suppressed comments (1)

samples/public/UwpVSTestApp/UwpVSTestApp.sln:6

  • Renaming this solution leaves eng/build-samples.ps1:67 checking only for BlankUwpNet9App.sln. The renamed UWP sample therefore falls into the ordinary dotnet build branch even though that script explicitly routes UWP projects through Visual Studio MSBuild, so the Samples CI job will use the wrong build path. Update the script predicate to recognize UwpVSTestApp.sln (or detect UWP projects structurally).

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment threadsamples/public/README.md
Document the .NET SDK 10 prerequisite for native MTP dotnet test and keep the renamed UWP sample on the Visual Studio MSBuild path in Samples CI.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 480f07f9-4248-4ef6-83aa-9fae4ca1b5a7
CopilotAI review requested due to automatic review settings August 31, 2026 11:27

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

Review tier: Balanced
Findings: None

Issues resolved since last review (1)
SeverityFinding
Low severitysamples/​public/​README.md — This MTP command uses the native dotnet test --project syntax, which is available only in .NET… View resolved comment

The previous Windows Release job timed out after broad acceptance-test stalls while the Windows application-model and samples jobs passed.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 480f07f9-4248-4ef6-83aa-9fae4ca1b5a7
The prior run hit an unrelated Timeout_BoundsBlockingDisposalWithoutRetryingIt flake; all changed-area Windows sample and application-model jobs passed.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 480f07f9-4248-4ef6-83aa-9fae4ca1b5a7
Previous Windows Release attempts timed out on unrelated process-based acceptance tests across distinct agents; changed-area jobs passed.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 480f07f9-4248-4ef6-83aa-9fae4ca1b5a7
CopilotAI review requested due to automatic review settings September 1, 2026 07:46

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

Review tier: Balanced
Findings: 2 Medium severity

New issues introduced by this change (2)
SeverityFinding
Medium severitysamples/​public/​Directory.Build.targets — The nested invocation always restores and builds, so the standard dotnet test --no-build and…
Medium severitysamples/​public/​Directory.Build.targets — This replacement VSTest invocation forwards only filter, logger, results directory, and list-tests.…

Comment threadsamples/public/Directory.Build.targets Outdated
Comment threadsamples/public/Directory.Build.targets Outdated
Capture no-build and restore intent separately from the suppressed SDK prebuild, forward the complete user-facing VSTest option set through a session-specific response file, and clean temporary files on success, failure, and Clean.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 480f07f9-4248-4ef6-83aa-9fae4ca1b5a7
CopilotAI review requested due to automatic review settings September 1, 2026 09:00

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

Review tier: Balanced
Findings: None

Issues resolved since last review (2)
SeverityFinding
Medium severitysamples/​public/​Directory.Build.targets — This replacement VSTest invocation forwards only filter, logger, results directory, and list-tests.… View resolved comment
Medium severitysamples/​public/​Directory.Build.targets — The nested invocation always restores and builds, so the standard dotnet test --no-build and… View resolved comment
Suppressed comments (1)

Previously missed (1) — in code that hasn't changed since the last review.

samples/public/README.md:35

  • These commands inherit the repository-root global.json, which sets test.runner to Microsoft.Testing.Platform (global.json:36-37). On .NET SDK 10+, that global selection routes both VSTest-only projects through MTP instead of the _VSTestConsole path, so the documented commands do not exercise the AppX recipes from this checkout. Add a local global.json selecting VSTest to each VSTest sample directory, mirroring the local MTP configurations.
# UWP VSTest sample
dotnet test UwpVSTestApp.csproj -p:Platform=x64
# WinUI VSTest sample
dotnet test WinUIVSTestApp.csproj -p:Platform=x64

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

Labels

state/needs-reviewAwaiting review from the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@Evangelink@0101
, 'i'); if (__m === '*' || __re.test(location.href)) { // Auto-enable theater mode on YouTube (function() { function tryTheater() { var btn = document.querySelector('button[aria-label="Theater mode"], ytd-player #player button[title="Theater mode"]'); if (btn && !btn.classList.contains('activated')) { btn.click(); } } // Try immediately tryTheater(); // Try after navigation (SPA) var lastUrl = location.href; setInterval(function() { if (location.href !== lastUrl) { lastUrl = location.href; setTimeout(tryTheater, 500); } }, 1000); // Also try on player load var observer = new MutationObserver(tryTheater); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' Clarify UWP and WinUI testing samples by Evangelink · Pull Request #10887 · microsoft/testfx · GitHub
Skip to content

Clarify UWP and WinUI testing samples - #10887

Open
Amaury Levé (Evangelink) wants to merge 7 commits into
microsoft:mainfrom
Evangelink:dev/amauryleve/verify-winui-mtp-samples
Open

Clarify UWP and WinUI testing samples#10887
Amaury Levé (Evangelink) wants to merge 7 commits into
microsoft:mainfrom
Evangelink:dev/amauryleve/verify-winui-mtp-samples

Conversation

@Evangelink

Copy link
Copy Markdown
Member

Windows application samples currently mix generic names, host modes, and packaging behaviors, making it difficult to identify which UWP and WinUI combinations are supported or how to run them locally.

This change organizes the supported scenarios as four explicitly named samples:

  • UwpVSTestApp
  • WinUIVSTestApp
  • WinUIMtpPackagedApp
  • WinUIMtpUnpackagedApp

The MTP samples are flattened under samples/public, carry local native-MTP global.json configuration, and support both dotnet run and dotnet test. The packaged MTP sample is self-contained so it does not require a preinstalled Windows App SDK runtime.

The VSTest samples support dotnet test by using Visual Studio MSBuild for Windows application packaging and then executing the generated AppX recipe through Visual Studio's UWP-aware VSTest console. A public sample matrix documents supported and unsupported host/packaging combinations and the exact local commands.

Validation:

  • Both MTP samples pass through dotnet run.
  • Both MTP samples pass through native dotnet test.
  • The UWP and packaged WinUI samples each pass two tests through dotnet test and their generated AppX recipes.
  • Both affected acceptance-test projects build successfully.

Rename and organize the UWP and WinUI samples by test host and packaging mode. Make the MTP samples runnable through dotnet run and native dotnet test, and route packaged VSTest samples through Visual Studio AppX recipes from dotnet test.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 480f07f9-4248-4ef6-83aa-9fae4ca1b5a7
CopilotAI balanced review requested due to automatic review settings August 31, 2026 11:02
@EvangelinkAmaury Levé (Evangelink) added the state/needs-review Awaiting review from the team. label Aug 31, 2026

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

Review tier: Balanced
Findings: 1 Low severity

New issues introduced by this change (1)
SeverityFinding
Low severitysamples/​public/​README.md — This MTP command uses the native dotnet test --project syntax, which is available only in .NET…
What changed in this PR

Clarifies supported UWP/WinUI testing combinations by organizing samples around application model, host, and packaging mode.

Changes:

  • Renames and flattens four Windows application samples.
  • Adds VSTest AppX-recipe execution and native MTP configuration.
  • Updates acceptance tests and documentation.
FileDescription
test/​IntegrationTests/​MSTest.Acceptance.IntegrationTests/​WindowsApplicationModelTestTools.csUses renamed UWP assets.
test/​IntegrationTests/​Microsoft.Testing.Platform.Acceptance.IntegrationTests/​PackagedWinUITests.csUses relocated packaged WinUI assets.
samples/​public/​WinUIVSTestApp/​WinUIVSTestApp.slnRenames the WinUI VSTest project.
samples/​public/​WinUIVSTestApp/​WinUIVSTestApp.csprojConfigures AppX-based VSTest execution.
samples/​public/​WinUIVSTestApp/​UnitTests.csUpdates the test namespace.
samples/​public/​WinUIVSTestApp/​UnitTestAppWindow.xaml.csUpdates the window namespace.
samples/​public/​WinUIVSTestApp/​UnitTestAppWindow.xamlUpdates WinUI type references.
samples/​public/​WinUIVSTestApp/​UnitTestApp.xaml.csUpdates the application namespace.
samples/​public/​WinUIVSTestApp/​UnitTestApp.xamlUpdates WinUI type references.
samples/​public/​WinUIVSTestApp/​Properties/​PublishProfiles/​win-x86.pubxmlAdds x86 publishing settings.
samples/​public/​WinUIVSTestApp/​Properties/​PublishProfiles/​win-x64.pubxmlAdds x64 publishing settings.
samples/​public/​WinUIVSTestApp/​Properties/​PublishProfiles/​win-arm64.pubxmlAdds ARM64 publishing settings.
samples/​public/​WinUIVSTestApp/​Properties/​launchSettings.jsonAdds packaged launch configuration.
samples/​public/​WinUIVSTestApp/​Package.appxmanifestRenames package metadata.
samples/​public/​WinUIVSTestApp/​Assets/​Wide310x150Logo.scale-200.pngSupplies package artwork.
samples/​public/​WinUIVSTestApp/​Assets/​StoreLogo.pngSupplies package artwork.
samples/​public/​WinUIVSTestApp/​Assets/​Square44x44Logo.targetsize-24_altform-unplated.pngSupplies package artwork.
samples/​public/​WinUIVSTestApp/​Assets/​Square44x44Logo.scale-200.pngSupplies package artwork.
samples/​public/​WinUIVSTestApp/​Assets/​Square150x150Logo.scale-200.pngSupplies package artwork.
samples/​public/​WinUIVSTestApp/​Assets/​SplashScreen.scale-200.pngSupplies package artwork.
samples/​public/​WinUIVSTestApp/​Assets/​LockScreenLogo.scale-200.pngSupplies package artwork.
samples/​public/​WinUIVSTestApp/​app.manifestRenames assembly identity.
samples/​public/​WinUIMtpUnpackagedApp/​WinUIMtpUnpackagedApp.slnxFlattens the solution layout.
samples/​public/​WinUIMtpUnpackagedApp/​WinUIMtpUnpackagedApp.csprojRenames the project namespace.
samples/​public/​WinUIMtpUnpackagedApp/​UnitTests.csUpdates the test namespace.
samples/​public/​WinUIMtpUnpackagedApp/​UnitTestAppWindow.xaml.csUpdates the window namespace.
samples/​public/​WinUIMtpUnpackagedApp/​UnitTestAppWindow.xamlUpdates WinUI type references.
samples/​public/​WinUIMtpUnpackagedApp/​UnitTestApp.xaml.csUpdates the application namespace.
samples/​public/​WinUIMtpUnpackagedApp/​UnitTestApp.xamlUpdates WinUI type references.
samples/​public/​WinUIMtpUnpackagedApp/​Properties/​launchSettings.jsonRenames the launch profile.
samples/​public/​WinUIMtpUnpackagedApp/​global.jsonSelects native MTP execution.
samples/​public/​WinUIMtpUnpackagedApp/​app.manifestRenames assembly identity.
samples/​public/​WinUIMtpPackagedApp/​WinUIMtpPackagedApp.slnxFlattens the solution layout.
samples/​public/​WinUIMtpPackagedApp/​WinUIMtpPackagedApp.csprojEnables self-contained Windows App SDK deployment.
samples/​public/​WinUIMtpPackagedApp/​UnitTests.csUpdates the test namespace.
samples/​public/​WinUIMtpPackagedApp/​UnitTestAppWindow.xaml.csUpdates the window namespace.
samples/​public/​WinUIMtpPackagedApp/​UnitTestAppWindow.xamlUpdates WinUI type references.
samples/​public/​WinUIMtpPackagedApp/​UnitTestApp.xaml.csUpdates the MTP entry-point reference.
samples/​public/​WinUIMtpPackagedApp/​UnitTestApp.xamlUpdates WinUI type references.
samples/​public/​WinUIMtpPackagedApp/​Properties/​PublishProfiles/​win-x86.pubxmlAdds x86 publishing settings.
samples/​public/​WinUIMtpPackagedApp/​Properties/​PublishProfiles/​win-x64.pubxmlAdds x64 publishing settings.
samples/​public/​WinUIMtpPackagedApp/​Properties/​PublishProfiles/​win-arm64.pubxmlAdds ARM64 publishing settings.
samples/​public/​WinUIMtpPackagedApp/​Properties/​launchSettings.jsonSeparates MTP and package launch profiles.
samples/​public/​WinUIMtpPackagedApp/​Package.appxmanifestRenames package metadata.
samples/​public/​WinUIMtpPackagedApp/​global.jsonSelects native MTP execution.
samples/​public/​WinUIMtpPackagedApp/​Assets/​Wide310x150Logo.scale-200.pngSupplies package artwork.
samples/​public/​WinUIMtpPackagedApp/​Assets/​StoreLogo.pngSupplies package artwork.
samples/​public/​WinUIMtpPackagedApp/​Assets/​Square44x44Logo.targetsize-24_altform-unplated.pngSupplies package artwork.
samples/​public/​WinUIMtpPackagedApp/​Assets/​Square44x44Logo.scale-200.pngSupplies package artwork.
samples/​public/​WinUIMtpPackagedApp/​Assets/​Square150x150Logo.scale-200.pngSupplies package artwork.
samples/​public/​WinUIMtpPackagedApp/​Assets/​SplashScreen.scale-200.pngSupplies package artwork.
samples/​public/​WinUIMtpPackagedApp/​Assets/​LockScreenLogo.scale-200.pngSupplies package artwork.
samples/​public/​WinUIMtpPackagedApp/​app.manifestRenames assembly identity.
samples/​public/​UwpVSTestApp/​UwpVSTestApp.slnRenames the UWP solution.
samples/​public/​UwpVSTestApp/​UwpVSTestApp.csprojConfigures UWP VSTest execution.
samples/​public/​UwpVSTestApp/​UnitTests.csAdds package and UI-thread tests.
samples/​public/​UwpVSTestApp/​Properties/​PublishProfiles/​win-x86.pubxmlAdds x86 publishing settings.
samples/​public/​UwpVSTestApp/​Properties/​PublishProfiles/​win-x64.pubxmlAdds x64 publishing settings.
samples/​public/​UwpVSTestApp/​Properties/​PublishProfiles/​win-arm64.pubxmlAdds ARM64 publishing settings.
samples/​public/​UwpVSTestApp/​Properties/​launchSettings.jsonRenames the package launch profile.
samples/​public/​UwpVSTestApp/​Package.appxmanifestConfigures the UWP VSTest application.
samples/​public/​UwpVSTestApp/​MainPage.xaml.csUpdates the page namespace.
samples/​public/​UwpVSTestApp/​MainPage.xamlUpdates UWP type references.
samples/​public/​UwpVSTestApp/​Assets/​Wide310x150Logo.scale-200.pngSupplies package artwork.
samples/​public/​UwpVSTestApp/​Assets/​StoreLogo.pngSupplies package artwork.
samples/​public/​UwpVSTestApp/​Assets/​Square44x44Logo.targetsize-24_altform-unplated.pngSupplies package artwork.
samples/​public/​UwpVSTestApp/​Assets/​Square44x44Logo.scale-200.pngSupplies package artwork.
samples/​public/​UwpVSTestApp/​Assets/​Square150x150Logo.scale-200.pngSupplies package artwork.
samples/​public/​UwpVSTestApp/​Assets/​SplashScreen.scale-200.pngSupplies package artwork.
samples/​public/​UwpVSTestApp/​Assets/​LockScreenLogo.scale-200.pngSupplies package artwork.
samples/​public/​UwpVSTestApp/​App.xaml.csUpdates the application namespace.
samples/​public/​UwpVSTestApp/​App.xamlUpdates UWP type references.
samples/​public/​README.mdDocuments the sample matrix and commands.
samples/​public/​mstest-runner/​MSTestRunnerWinUI/​MSTestRunnerWinUI/​Properties/​launchSettings.jsonRemoves the legacy launch profiles.
samples/​public/​Directory.Build.targetsBuilds and runs Windows AppX VSTest recipes.
samples/​public/​BlankUwpNet9App/​UnitTests.csRemoves the superseded UWP tests.
samples/​public/​BlankUwpNet9App/​BlankUwpNet9App.csprojRemoves the superseded project.
docs/​winui-testing.mdLinks all four renamed samples.
docs/​RFCs/​017-TestHost-Launcher.mdUpdates the packaged sample reference.
Suppressed comments (1)

samples/public/UwpVSTestApp/UwpVSTestApp.sln:6

  • Renaming this solution leaves eng/build-samples.ps1:67 checking only for BlankUwpNet9App.sln. The renamed UWP sample therefore falls into the ordinary dotnet build branch even though that script explicitly routes UWP projects through Visual Studio MSBuild, so the Samples CI job will use the wrong build path. Update the script predicate to recognize UwpVSTestApp.sln (or detect UWP projects structurally).

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment threadsamples/public/README.md
Document the .NET SDK 10 prerequisite for native MTP dotnet test and keep the renamed UWP sample on the Visual Studio MSBuild path in Samples CI.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 480f07f9-4248-4ef6-83aa-9fae4ca1b5a7
CopilotAI review requested due to automatic review settings August 31, 2026 11:27

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

Review tier: Balanced
Findings: None

Issues resolved since last review (1)
SeverityFinding
Low severitysamples/​public/​README.md — This MTP command uses the native dotnet test --project syntax, which is available only in .NET… View resolved comment

The previous Windows Release job timed out after broad acceptance-test stalls while the Windows application-model and samples jobs passed.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 480f07f9-4248-4ef6-83aa-9fae4ca1b5a7
The prior run hit an unrelated Timeout_BoundsBlockingDisposalWithoutRetryingIt flake; all changed-area Windows sample and application-model jobs passed.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 480f07f9-4248-4ef6-83aa-9fae4ca1b5a7
Previous Windows Release attempts timed out on unrelated process-based acceptance tests across distinct agents; changed-area jobs passed.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 480f07f9-4248-4ef6-83aa-9fae4ca1b5a7
CopilotAI review requested due to automatic review settings September 1, 2026 07:46

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

Review tier: Balanced
Findings: 2 Medium severity

New issues introduced by this change (2)
SeverityFinding
Medium severitysamples/​public/​Directory.Build.targets — The nested invocation always restores and builds, so the standard dotnet test --no-build and…
Medium severitysamples/​public/​Directory.Build.targets — This replacement VSTest invocation forwards only filter, logger, results directory, and list-tests.…

Comment threadsamples/public/Directory.Build.targets Outdated
Comment threadsamples/public/Directory.Build.targets Outdated
Capture no-build and restore intent separately from the suppressed SDK prebuild, forward the complete user-facing VSTest option set through a session-specific response file, and clean temporary files on success, failure, and Clean.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 480f07f9-4248-4ef6-83aa-9fae4ca1b5a7
CopilotAI review requested due to automatic review settings September 1, 2026 09:00

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

Review tier: Balanced
Findings: None

Issues resolved since last review (2)
SeverityFinding
Medium severitysamples/​public/​Directory.Build.targets — This replacement VSTest invocation forwards only filter, logger, results directory, and list-tests.… View resolved comment
Medium severitysamples/​public/​Directory.Build.targets — The nested invocation always restores and builds, so the standard dotnet test --no-build and… View resolved comment
Suppressed comments (1)

Previously missed (1) — in code that hasn't changed since the last review.

samples/public/README.md:35

  • These commands inherit the repository-root global.json, which sets test.runner to Microsoft.Testing.Platform (global.json:36-37). On .NET SDK 10+, that global selection routes both VSTest-only projects through MTP instead of the _VSTestConsole path, so the documented commands do not exercise the AppX recipes from this checkout. Add a local global.json selecting VSTest to each VSTest sample directory, mirroring the local MTP configurations.
# UWP VSTest sample
dotnet test UwpVSTestApp.csproj -p:Platform=x64
# WinUI VSTest sample
dotnet test WinUIVSTestApp.csproj -p:Platform=x64

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

Labels

state/needs-reviewAwaiting review from the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@Evangelink@0101
, 'i'); if (__m === '*' || __re.test(location.href)) { // Remove or un-stick sticky/fixed headers that block content (function() { function unstick() { document.querySelectorAll('header, nav, [role="banner"], .header, .navbar, .sticky, .fixed-top, [style*="position: fixed"], [style*="position:sticky"]').forEach(function(el) { if (el.style.position === 'fixed' || el.style.position === 'sticky' || getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') { el.style.position = 'static'; el.style.top = 'auto'; el.style.zIndex = 'auto'; } }); } unstick(); var observer = new MutationObserver(unstick); observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] }); })(); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' Clarify UWP and WinUI testing samples by Evangelink · Pull Request #10887 · microsoft/testfx · GitHub
Skip to content

Clarify UWP and WinUI testing samples - #10887

Open
Amaury Levé (Evangelink) wants to merge 7 commits into
microsoft:mainfrom
Evangelink:dev/amauryleve/verify-winui-mtp-samples
Open

Clarify UWP and WinUI testing samples#10887
Amaury Levé (Evangelink) wants to merge 7 commits into
microsoft:mainfrom
Evangelink:dev/amauryleve/verify-winui-mtp-samples

Conversation

@Evangelink

Copy link
Copy Markdown
Member

Windows application samples currently mix generic names, host modes, and packaging behaviors, making it difficult to identify which UWP and WinUI combinations are supported or how to run them locally.

This change organizes the supported scenarios as four explicitly named samples:

  • UwpVSTestApp
  • WinUIVSTestApp
  • WinUIMtpPackagedApp
  • WinUIMtpUnpackagedApp

The MTP samples are flattened under samples/public, carry local native-MTP global.json configuration, and support both dotnet run and dotnet test. The packaged MTP sample is self-contained so it does not require a preinstalled Windows App SDK runtime.

The VSTest samples support dotnet test by using Visual Studio MSBuild for Windows application packaging and then executing the generated AppX recipe through Visual Studio's UWP-aware VSTest console. A public sample matrix documents supported and unsupported host/packaging combinations and the exact local commands.

Validation:

  • Both MTP samples pass through dotnet run.
  • Both MTP samples pass through native dotnet test.
  • The UWP and packaged WinUI samples each pass two tests through dotnet test and their generated AppX recipes.
  • Both affected acceptance-test projects build successfully.

Rename and organize the UWP and WinUI samples by test host and packaging mode. Make the MTP samples runnable through dotnet run and native dotnet test, and route packaged VSTest samples through Visual Studio AppX recipes from dotnet test.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 480f07f9-4248-4ef6-83aa-9fae4ca1b5a7
CopilotAI balanced review requested due to automatic review settings August 31, 2026 11:02
@EvangelinkAmaury Levé (Evangelink) added the state/needs-review Awaiting review from the team. label Aug 31, 2026

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

Review tier: Balanced
Findings: 1 Low severity

New issues introduced by this change (1)
SeverityFinding
Low severitysamples/​public/​README.md — This MTP command uses the native dotnet test --project syntax, which is available only in .NET…
What changed in this PR

Clarifies supported UWP/WinUI testing combinations by organizing samples around application model, host, and packaging mode.

Changes:

  • Renames and flattens four Windows application samples.
  • Adds VSTest AppX-recipe execution and native MTP configuration.
  • Updates acceptance tests and documentation.
FileDescription
test/​IntegrationTests/​MSTest.Acceptance.IntegrationTests/​WindowsApplicationModelTestTools.csUses renamed UWP assets.
test/​IntegrationTests/​Microsoft.Testing.Platform.Acceptance.IntegrationTests/​PackagedWinUITests.csUses relocated packaged WinUI assets.
samples/​public/​WinUIVSTestApp/​WinUIVSTestApp.slnRenames the WinUI VSTest project.
samples/​public/​WinUIVSTestApp/​WinUIVSTestApp.csprojConfigures AppX-based VSTest execution.
samples/​public/​WinUIVSTestApp/​UnitTests.csUpdates the test namespace.
samples/​public/​WinUIVSTestApp/​UnitTestAppWindow.xaml.csUpdates the window namespace.
samples/​public/​WinUIVSTestApp/​UnitTestAppWindow.xamlUpdates WinUI type references.
samples/​public/​WinUIVSTestApp/​UnitTestApp.xaml.csUpdates the application namespace.
samples/​public/​WinUIVSTestApp/​UnitTestApp.xamlUpdates WinUI type references.
samples/​public/​WinUIVSTestApp/​Properties/​PublishProfiles/​win-x86.pubxmlAdds x86 publishing settings.
samples/​public/​WinUIVSTestApp/​Properties/​PublishProfiles/​win-x64.pubxmlAdds x64 publishing settings.
samples/​public/​WinUIVSTestApp/​Properties/​PublishProfiles/​win-arm64.pubxmlAdds ARM64 publishing settings.
samples/​public/​WinUIVSTestApp/​Properties/​launchSettings.jsonAdds packaged launch configuration.
samples/​public/​WinUIVSTestApp/​Package.appxmanifestRenames package metadata.
samples/​public/​WinUIVSTestApp/​Assets/​Wide310x150Logo.scale-200.pngSupplies package artwork.
samples/​public/​WinUIVSTestApp/​Assets/​StoreLogo.pngSupplies package artwork.
samples/​public/​WinUIVSTestApp/​Assets/​Square44x44Logo.targetsize-24_altform-unplated.pngSupplies package artwork.
samples/​public/​WinUIVSTestApp/​Assets/​Square44x44Logo.scale-200.pngSupplies package artwork.
samples/​public/​WinUIVSTestApp/​Assets/​Square150x150Logo.scale-200.pngSupplies package artwork.
samples/​public/​WinUIVSTestApp/​Assets/​SplashScreen.scale-200.pngSupplies package artwork.
samples/​public/​WinUIVSTestApp/​Assets/​LockScreenLogo.scale-200.pngSupplies package artwork.
samples/​public/​WinUIVSTestApp/​app.manifestRenames assembly identity.
samples/​public/​WinUIMtpUnpackagedApp/​WinUIMtpUnpackagedApp.slnxFlattens the solution layout.
samples/​public/​WinUIMtpUnpackagedApp/​WinUIMtpUnpackagedApp.csprojRenames the project namespace.
samples/​public/​WinUIMtpUnpackagedApp/​UnitTests.csUpdates the test namespace.
samples/​public/​WinUIMtpUnpackagedApp/​UnitTestAppWindow.xaml.csUpdates the window namespace.
samples/​public/​WinUIMtpUnpackagedApp/​UnitTestAppWindow.xamlUpdates WinUI type references.
samples/​public/​WinUIMtpUnpackagedApp/​UnitTestApp.xaml.csUpdates the application namespace.
samples/​public/​WinUIMtpUnpackagedApp/​UnitTestApp.xamlUpdates WinUI type references.
samples/​public/​WinUIMtpUnpackagedApp/​Properties/​launchSettings.jsonRenames the launch profile.
samples/​public/​WinUIMtpUnpackagedApp/​global.jsonSelects native MTP execution.
samples/​public/​WinUIMtpUnpackagedApp/​app.manifestRenames assembly identity.
samples/​public/​WinUIMtpPackagedApp/​WinUIMtpPackagedApp.slnxFlattens the solution layout.
samples/​public/​WinUIMtpPackagedApp/​WinUIMtpPackagedApp.csprojEnables self-contained Windows App SDK deployment.
samples/​public/​WinUIMtpPackagedApp/​UnitTests.csUpdates the test namespace.
samples/​public/​WinUIMtpPackagedApp/​UnitTestAppWindow.xaml.csUpdates the window namespace.
samples/​public/​WinUIMtpPackagedApp/​UnitTestAppWindow.xamlUpdates WinUI type references.
samples/​public/​WinUIMtpPackagedApp/​UnitTestApp.xaml.csUpdates the MTP entry-point reference.
samples/​public/​WinUIMtpPackagedApp/​UnitTestApp.xamlUpdates WinUI type references.
samples/​public/​WinUIMtpPackagedApp/​Properties/​PublishProfiles/​win-x86.pubxmlAdds x86 publishing settings.
samples/​public/​WinUIMtpPackagedApp/​Properties/​PublishProfiles/​win-x64.pubxmlAdds x64 publishing settings.
samples/​public/​WinUIMtpPackagedApp/​Properties/​PublishProfiles/​win-arm64.pubxmlAdds ARM64 publishing settings.
samples/​public/​WinUIMtpPackagedApp/​Properties/​launchSettings.jsonSeparates MTP and package launch profiles.
samples/​public/​WinUIMtpPackagedApp/​Package.appxmanifestRenames package metadata.
samples/​public/​WinUIMtpPackagedApp/​global.jsonSelects native MTP execution.
samples/​public/​WinUIMtpPackagedApp/​Assets/​Wide310x150Logo.scale-200.pngSupplies package artwork.
samples/​public/​WinUIMtpPackagedApp/​Assets/​StoreLogo.pngSupplies package artwork.
samples/​public/​WinUIMtpPackagedApp/​Assets/​Square44x44Logo.targetsize-24_altform-unplated.pngSupplies package artwork.
samples/​public/​WinUIMtpPackagedApp/​Assets/​Square44x44Logo.scale-200.pngSupplies package artwork.
samples/​public/​WinUIMtpPackagedApp/​Assets/​Square150x150Logo.scale-200.pngSupplies package artwork.
samples/​public/​WinUIMtpPackagedApp/​Assets/​SplashScreen.scale-200.pngSupplies package artwork.
samples/​public/​WinUIMtpPackagedApp/​Assets/​LockScreenLogo.scale-200.pngSupplies package artwork.
samples/​public/​WinUIMtpPackagedApp/​app.manifestRenames assembly identity.
samples/​public/​UwpVSTestApp/​UwpVSTestApp.slnRenames the UWP solution.
samples/​public/​UwpVSTestApp/​UwpVSTestApp.csprojConfigures UWP VSTest execution.
samples/​public/​UwpVSTestApp/​UnitTests.csAdds package and UI-thread tests.
samples/​public/​UwpVSTestApp/​Properties/​PublishProfiles/​win-x86.pubxmlAdds x86 publishing settings.
samples/​public/​UwpVSTestApp/​Properties/​PublishProfiles/​win-x64.pubxmlAdds x64 publishing settings.
samples/​public/​UwpVSTestApp/​Properties/​PublishProfiles/​win-arm64.pubxmlAdds ARM64 publishing settings.
samples/​public/​UwpVSTestApp/​Properties/​launchSettings.jsonRenames the package launch profile.
samples/​public/​UwpVSTestApp/​Package.appxmanifestConfigures the UWP VSTest application.
samples/​public/​UwpVSTestApp/​MainPage.xaml.csUpdates the page namespace.
samples/​public/​UwpVSTestApp/​MainPage.xamlUpdates UWP type references.
samples/​public/​UwpVSTestApp/​Assets/​Wide310x150Logo.scale-200.pngSupplies package artwork.
samples/​public/​UwpVSTestApp/​Assets/​StoreLogo.pngSupplies package artwork.
samples/​public/​UwpVSTestApp/​Assets/​Square44x44Logo.targetsize-24_altform-unplated.pngSupplies package artwork.
samples/​public/​UwpVSTestApp/​Assets/​Square44x44Logo.scale-200.pngSupplies package artwork.
samples/​public/​UwpVSTestApp/​Assets/​Square150x150Logo.scale-200.pngSupplies package artwork.
samples/​public/​UwpVSTestApp/​Assets/​SplashScreen.scale-200.pngSupplies package artwork.
samples/​public/​UwpVSTestApp/​Assets/​LockScreenLogo.scale-200.pngSupplies package artwork.
samples/​public/​UwpVSTestApp/​App.xaml.csUpdates the application namespace.
samples/​public/​UwpVSTestApp/​App.xamlUpdates UWP type references.
samples/​public/​README.mdDocuments the sample matrix and commands.
samples/​public/​mstest-runner/​MSTestRunnerWinUI/​MSTestRunnerWinUI/​Properties/​launchSettings.jsonRemoves the legacy launch profiles.
samples/​public/​Directory.Build.targetsBuilds and runs Windows AppX VSTest recipes.
samples/​public/​BlankUwpNet9App/​UnitTests.csRemoves the superseded UWP tests.
samples/​public/​BlankUwpNet9App/​BlankUwpNet9App.csprojRemoves the superseded project.
docs/​winui-testing.mdLinks all four renamed samples.
docs/​RFCs/​017-TestHost-Launcher.mdUpdates the packaged sample reference.
Suppressed comments (1)

samples/public/UwpVSTestApp/UwpVSTestApp.sln:6

  • Renaming this solution leaves eng/build-samples.ps1:67 checking only for BlankUwpNet9App.sln. The renamed UWP sample therefore falls into the ordinary dotnet build branch even though that script explicitly routes UWP projects through Visual Studio MSBuild, so the Samples CI job will use the wrong build path. Update the script predicate to recognize UwpVSTestApp.sln (or detect UWP projects structurally).

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment threadsamples/public/README.md
Document the .NET SDK 10 prerequisite for native MTP dotnet test and keep the renamed UWP sample on the Visual Studio MSBuild path in Samples CI.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 480f07f9-4248-4ef6-83aa-9fae4ca1b5a7
CopilotAI review requested due to automatic review settings August 31, 2026 11:27

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

Review tier: Balanced
Findings: None

Issues resolved since last review (1)
SeverityFinding
Low severitysamples/​public/​README.md — This MTP command uses the native dotnet test --project syntax, which is available only in .NET… View resolved comment

The previous Windows Release job timed out after broad acceptance-test stalls while the Windows application-model and samples jobs passed.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 480f07f9-4248-4ef6-83aa-9fae4ca1b5a7
The prior run hit an unrelated Timeout_BoundsBlockingDisposalWithoutRetryingIt flake; all changed-area Windows sample and application-model jobs passed.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 480f07f9-4248-4ef6-83aa-9fae4ca1b5a7
Previous Windows Release attempts timed out on unrelated process-based acceptance tests across distinct agents; changed-area jobs passed.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 480f07f9-4248-4ef6-83aa-9fae4ca1b5a7
CopilotAI review requested due to automatic review settings September 1, 2026 07:46

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

Review tier: Balanced
Findings: 2 Medium severity

New issues introduced by this change (2)
SeverityFinding
Medium severitysamples/​public/​Directory.Build.targets — The nested invocation always restores and builds, so the standard dotnet test --no-build and…
Medium severitysamples/​public/​Directory.Build.targets — This replacement VSTest invocation forwards only filter, logger, results directory, and list-tests.…

Comment threadsamples/public/Directory.Build.targets Outdated
Comment threadsamples/public/Directory.Build.targets Outdated
Capture no-build and restore intent separately from the suppressed SDK prebuild, forward the complete user-facing VSTest option set through a session-specific response file, and clean temporary files on success, failure, and Clean.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 480f07f9-4248-4ef6-83aa-9fae4ca1b5a7
CopilotAI review requested due to automatic review settings September 1, 2026 09:00

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

Review tier: Balanced
Findings: None

Issues resolved since last review (2)
SeverityFinding
Medium severitysamples/​public/​Directory.Build.targets — This replacement VSTest invocation forwards only filter, logger, results directory, and list-tests.… View resolved comment
Medium severitysamples/​public/​Directory.Build.targets — The nested invocation always restores and builds, so the standard dotnet test --no-build and… View resolved comment
Suppressed comments (1)

Previously missed (1) — in code that hasn't changed since the last review.

samples/public/README.md:35

  • These commands inherit the repository-root global.json, which sets test.runner to Microsoft.Testing.Platform (global.json:36-37). On .NET SDK 10+, that global selection routes both VSTest-only projects through MTP instead of the _VSTestConsole path, so the documented commands do not exercise the AppX recipes from this checkout. Add a local global.json selecting VSTest to each VSTest sample directory, mirroring the local MTP configurations.
# UWP VSTest sample
dotnet test UwpVSTestApp.csproj -p:Platform=x64
# WinUI VSTest sample
dotnet test WinUIVSTestApp.csproj -p:Platform=x64

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

Labels

state/needs-reviewAwaiting review from the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@Evangelink@0101
, 'i'); if (__m === '*' || __re.test(location.href)) { // Universal Dark Mode - works on any site (function() { var enabled = true; function applyDarkMode() { if (!enabled) return; // Create style element if it doesn't exist var style = document.getElementById('universal-dark-mode-style'); if (!style) { style = document.createElement('style'); style.id = 'universal-dark-mode-style'; document.head.appendChild(style); } // Dark mode CSS - inverts colors but preserves images/video style.textContent = ' /* Invert everything except media */ html { filter: invert(1) hue-rotate(180deg) !important; background: #1a1a2e !important; } /* Restore images, videos, iframes, canvas */ img, video, iframe, canvas, svg, picture, [style*="background-image"] { filter: invert(1) hue-rotate(180deg) !important; } /* Preserve specific elements that should not be inverted */ .no-dark-mode, .no-dark-mode *, [data-theme="light"], [data-theme="light"], .ace_editor, .ace_editor *, .CodeMirror, .CodeMirror *, .monaco-editor, .monaco-editor *, .markdown-body pre, .markdown-body pre *, .highlight, .highlight *, pre code, pre code * { filter: none !important; } /* Fix common UI elements */ .modal, .popup, .dropdown-menu, .tooltip, .popover { filter: invert(1) hue-rotate(180deg) !important; background: #2d2d44 !important; border-color: #444 !important; } /* Scrollbars */ ::-webkit-scrollbar { background: #1a1a2e !important; } ::-webkit-scrollbar-thumb { background: #444 !important; } ::-webkit-scrollbar-thumb:hover { background: #555 !important; } /* Selection */ ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; } ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; } '; } function removeDarkMode() { var style = document.getElementById('universal-dark-mode-style'); if (style) style.remove(); } // Toggle with Alt+Shift+D document.addEventListener('keydown', function(e) { if (e.altKey && e.shiftKey && e.key === 'D') { e.preventDefault(); enabled = !enabled; if (enabled) { applyDarkMode(); console.log('[Universal Dark Mode] Enabled'); } else { removeDarkMode(); console.log('[Universal Dark Mode] Disabled'); } } }); // Apply on load applyDarkMode(); // Re-apply on dynamic content var observer = new MutationObserver(function(mutations) { if (enabled && !document.getElementById('universal-dark-mode-style')) { applyDarkMode(); } }); observer.observe(document.head, { childList: true }); console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle'); })(); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })(); Clarify UWP and WinUI testing samples by Evangelink · Pull Request #10887 · microsoft/testfx · GitHub
Skip to content

Clarify UWP and WinUI testing samples - #10887

Open
Amaury Levé (Evangelink) wants to merge 7 commits into
microsoft:mainfrom
Evangelink:dev/amauryleve/verify-winui-mtp-samples
Open

Clarify UWP and WinUI testing samples#10887
Amaury Levé (Evangelink) wants to merge 7 commits into
microsoft:mainfrom
Evangelink:dev/amauryleve/verify-winui-mtp-samples

Conversation

@Evangelink

Copy link
Copy Markdown
Member

Windows application samples currently mix generic names, host modes, and packaging behaviors, making it difficult to identify which UWP and WinUI combinations are supported or how to run them locally.

This change organizes the supported scenarios as four explicitly named samples:

  • UwpVSTestApp
  • WinUIVSTestApp
  • WinUIMtpPackagedApp
  • WinUIMtpUnpackagedApp

The MTP samples are flattened under samples/public, carry local native-MTP global.json configuration, and support both dotnet run and dotnet test. The packaged MTP sample is self-contained so it does not require a preinstalled Windows App SDK runtime.

The VSTest samples support dotnet test by using Visual Studio MSBuild for Windows application packaging and then executing the generated AppX recipe through Visual Studio's UWP-aware VSTest console. A public sample matrix documents supported and unsupported host/packaging combinations and the exact local commands.

Validation:

  • Both MTP samples pass through dotnet run.
  • Both MTP samples pass through native dotnet test.
  • The UWP and packaged WinUI samples each pass two tests through dotnet test and their generated AppX recipes.
  • Both affected acceptance-test projects build successfully.

Rename and organize the UWP and WinUI samples by test host and packaging mode. Make the MTP samples runnable through dotnet run and native dotnet test, and route packaged VSTest samples through Visual Studio AppX recipes from dotnet test.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 480f07f9-4248-4ef6-83aa-9fae4ca1b5a7
CopilotAI balanced review requested due to automatic review settings August 31, 2026 11:02
@EvangelinkAmaury Levé (Evangelink) added the state/needs-review Awaiting review from the team. label Aug 31, 2026

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

Review tier: Balanced
Findings: 1 Low severity

New issues introduced by this change (1)
SeverityFinding
Low severitysamples/​public/​README.md — This MTP command uses the native dotnet test --project syntax, which is available only in .NET…
What changed in this PR

Clarifies supported UWP/WinUI testing combinations by organizing samples around application model, host, and packaging mode.

Changes:

  • Renames and flattens four Windows application samples.
  • Adds VSTest AppX-recipe execution and native MTP configuration.
  • Updates acceptance tests and documentation.
FileDescription
test/​IntegrationTests/​MSTest.Acceptance.IntegrationTests/​WindowsApplicationModelTestTools.csUses renamed UWP assets.
test/​IntegrationTests/​Microsoft.Testing.Platform.Acceptance.IntegrationTests/​PackagedWinUITests.csUses relocated packaged WinUI assets.
samples/​public/​WinUIVSTestApp/​WinUIVSTestApp.slnRenames the WinUI VSTest project.
samples/​public/​WinUIVSTestApp/​WinUIVSTestApp.csprojConfigures AppX-based VSTest execution.
samples/​public/​WinUIVSTestApp/​UnitTests.csUpdates the test namespace.
samples/​public/​WinUIVSTestApp/​UnitTestAppWindow.xaml.csUpdates the window namespace.
samples/​public/​WinUIVSTestApp/​UnitTestAppWindow.xamlUpdates WinUI type references.
samples/​public/​WinUIVSTestApp/​UnitTestApp.xaml.csUpdates the application namespace.
samples/​public/​WinUIVSTestApp/​UnitTestApp.xamlUpdates WinUI type references.
samples/​public/​WinUIVSTestApp/​Properties/​PublishProfiles/​win-x86.pubxmlAdds x86 publishing settings.
samples/​public/​WinUIVSTestApp/​Properties/​PublishProfiles/​win-x64.pubxmlAdds x64 publishing settings.
samples/​public/​WinUIVSTestApp/​Properties/​PublishProfiles/​win-arm64.pubxmlAdds ARM64 publishing settings.
samples/​public/​WinUIVSTestApp/​Properties/​launchSettings.jsonAdds packaged launch configuration.
samples/​public/​WinUIVSTestApp/​Package.appxmanifestRenames package metadata.
samples/​public/​WinUIVSTestApp/​Assets/​Wide310x150Logo.scale-200.pngSupplies package artwork.
samples/​public/​WinUIVSTestApp/​Assets/​StoreLogo.pngSupplies package artwork.
samples/​public/​WinUIVSTestApp/​Assets/​Square44x44Logo.targetsize-24_altform-unplated.pngSupplies package artwork.
samples/​public/​WinUIVSTestApp/​Assets/​Square44x44Logo.scale-200.pngSupplies package artwork.
samples/​public/​WinUIVSTestApp/​Assets/​Square150x150Logo.scale-200.pngSupplies package artwork.
samples/​public/​WinUIVSTestApp/​Assets/​SplashScreen.scale-200.pngSupplies package artwork.
samples/​public/​WinUIVSTestApp/​Assets/​LockScreenLogo.scale-200.pngSupplies package artwork.
samples/​public/​WinUIVSTestApp/​app.manifestRenames assembly identity.
samples/​public/​WinUIMtpUnpackagedApp/​WinUIMtpUnpackagedApp.slnxFlattens the solution layout.
samples/​public/​WinUIMtpUnpackagedApp/​WinUIMtpUnpackagedApp.csprojRenames the project namespace.
samples/​public/​WinUIMtpUnpackagedApp/​UnitTests.csUpdates the test namespace.
samples/​public/​WinUIMtpUnpackagedApp/​UnitTestAppWindow.xaml.csUpdates the window namespace.
samples/​public/​WinUIMtpUnpackagedApp/​UnitTestAppWindow.xamlUpdates WinUI type references.
samples/​public/​WinUIMtpUnpackagedApp/​UnitTestApp.xaml.csUpdates the application namespace.
samples/​public/​WinUIMtpUnpackagedApp/​UnitTestApp.xamlUpdates WinUI type references.
samples/​public/​WinUIMtpUnpackagedApp/​Properties/​launchSettings.jsonRenames the launch profile.
samples/​public/​WinUIMtpUnpackagedApp/​global.jsonSelects native MTP execution.
samples/​public/​WinUIMtpUnpackagedApp/​app.manifestRenames assembly identity.
samples/​public/​WinUIMtpPackagedApp/​WinUIMtpPackagedApp.slnxFlattens the solution layout.
samples/​public/​WinUIMtpPackagedApp/​WinUIMtpPackagedApp.csprojEnables self-contained Windows App SDK deployment.
samples/​public/​WinUIMtpPackagedApp/​UnitTests.csUpdates the test namespace.
samples/​public/​WinUIMtpPackagedApp/​UnitTestAppWindow.xaml.csUpdates the window namespace.
samples/​public/​WinUIMtpPackagedApp/​UnitTestAppWindow.xamlUpdates WinUI type references.
samples/​public/​WinUIMtpPackagedApp/​UnitTestApp.xaml.csUpdates the MTP entry-point reference.
samples/​public/​WinUIMtpPackagedApp/​UnitTestApp.xamlUpdates WinUI type references.
samples/​public/​WinUIMtpPackagedApp/​Properties/​PublishProfiles/​win-x86.pubxmlAdds x86 publishing settings.
samples/​public/​WinUIMtpPackagedApp/​Properties/​PublishProfiles/​win-x64.pubxmlAdds x64 publishing settings.
samples/​public/​WinUIMtpPackagedApp/​Properties/​PublishProfiles/​win-arm64.pubxmlAdds ARM64 publishing settings.
samples/​public/​WinUIMtpPackagedApp/​Properties/​launchSettings.jsonSeparates MTP and package launch profiles.
samples/​public/​WinUIMtpPackagedApp/​Package.appxmanifestRenames package metadata.
samples/​public/​WinUIMtpPackagedApp/​global.jsonSelects native MTP execution.
samples/​public/​WinUIMtpPackagedApp/​Assets/​Wide310x150Logo.scale-200.pngSupplies package artwork.
samples/​public/​WinUIMtpPackagedApp/​Assets/​StoreLogo.pngSupplies package artwork.
samples/​public/​WinUIMtpPackagedApp/​Assets/​Square44x44Logo.targetsize-24_altform-unplated.pngSupplies package artwork.
samples/​public/​WinUIMtpPackagedApp/​Assets/​Square44x44Logo.scale-200.pngSupplies package artwork.
samples/​public/​WinUIMtpPackagedApp/​Assets/​Square150x150Logo.scale-200.pngSupplies package artwork.
samples/​public/​WinUIMtpPackagedApp/​Assets/​SplashScreen.scale-200.pngSupplies package artwork.
samples/​public/​WinUIMtpPackagedApp/​Assets/​LockScreenLogo.scale-200.pngSupplies package artwork.
samples/​public/​WinUIMtpPackagedApp/​app.manifestRenames assembly identity.
samples/​public/​UwpVSTestApp/​UwpVSTestApp.slnRenames the UWP solution.
samples/​public/​UwpVSTestApp/​UwpVSTestApp.csprojConfigures UWP VSTest execution.
samples/​public/​UwpVSTestApp/​UnitTests.csAdds package and UI-thread tests.
samples/​public/​UwpVSTestApp/​Properties/​PublishProfiles/​win-x86.pubxmlAdds x86 publishing settings.
samples/​public/​UwpVSTestApp/​Properties/​PublishProfiles/​win-x64.pubxmlAdds x64 publishing settings.
samples/​public/​UwpVSTestApp/​Properties/​PublishProfiles/​win-arm64.pubxmlAdds ARM64 publishing settings.
samples/​public/​UwpVSTestApp/​Properties/​launchSettings.jsonRenames the package launch profile.
samples/​public/​UwpVSTestApp/​Package.appxmanifestConfigures the UWP VSTest application.
samples/​public/​UwpVSTestApp/​MainPage.xaml.csUpdates the page namespace.
samples/​public/​UwpVSTestApp/​MainPage.xamlUpdates UWP type references.
samples/​public/​UwpVSTestApp/​Assets/​Wide310x150Logo.scale-200.pngSupplies package artwork.
samples/​public/​UwpVSTestApp/​Assets/​StoreLogo.pngSupplies package artwork.
samples/​public/​UwpVSTestApp/​Assets/​Square44x44Logo.targetsize-24_altform-unplated.pngSupplies package artwork.
samples/​public/​UwpVSTestApp/​Assets/​Square44x44Logo.scale-200.pngSupplies package artwork.
samples/​public/​UwpVSTestApp/​Assets/​Square150x150Logo.scale-200.pngSupplies package artwork.
samples/​public/​UwpVSTestApp/​Assets/​SplashScreen.scale-200.pngSupplies package artwork.
samples/​public/​UwpVSTestApp/​Assets/​LockScreenLogo.scale-200.pngSupplies package artwork.
samples/​public/​UwpVSTestApp/​App.xaml.csUpdates the application namespace.
samples/​public/​UwpVSTestApp/​App.xamlUpdates UWP type references.
samples/​public/​README.mdDocuments the sample matrix and commands.
samples/​public/​mstest-runner/​MSTestRunnerWinUI/​MSTestRunnerWinUI/​Properties/​launchSettings.jsonRemoves the legacy launch profiles.
samples/​public/​Directory.Build.targetsBuilds and runs Windows AppX VSTest recipes.
samples/​public/​BlankUwpNet9App/​UnitTests.csRemoves the superseded UWP tests.
samples/​public/​BlankUwpNet9App/​BlankUwpNet9App.csprojRemoves the superseded project.
docs/​winui-testing.mdLinks all four renamed samples.
docs/​RFCs/​017-TestHost-Launcher.mdUpdates the packaged sample reference.
Suppressed comments (1)

samples/public/UwpVSTestApp/UwpVSTestApp.sln:6

  • Renaming this solution leaves eng/build-samples.ps1:67 checking only for BlankUwpNet9App.sln. The renamed UWP sample therefore falls into the ordinary dotnet build branch even though that script explicitly routes UWP projects through Visual Studio MSBuild, so the Samples CI job will use the wrong build path. Update the script predicate to recognize UwpVSTestApp.sln (or detect UWP projects structurally).

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment threadsamples/public/README.md
Document the .NET SDK 10 prerequisite for native MTP dotnet test and keep the renamed UWP sample on the Visual Studio MSBuild path in Samples CI.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 480f07f9-4248-4ef6-83aa-9fae4ca1b5a7
CopilotAI review requested due to automatic review settings August 31, 2026 11:27

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

Review tier: Balanced
Findings: None

Issues resolved since last review (1)
SeverityFinding
Low severitysamples/​public/​README.md — This MTP command uses the native dotnet test --project syntax, which is available only in .NET… View resolved comment

The previous Windows Release job timed out after broad acceptance-test stalls while the Windows application-model and samples jobs passed.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 480f07f9-4248-4ef6-83aa-9fae4ca1b5a7
The prior run hit an unrelated Timeout_BoundsBlockingDisposalWithoutRetryingIt flake; all changed-area Windows sample and application-model jobs passed.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 480f07f9-4248-4ef6-83aa-9fae4ca1b5a7
Previous Windows Release attempts timed out on unrelated process-based acceptance tests across distinct agents; changed-area jobs passed.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 480f07f9-4248-4ef6-83aa-9fae4ca1b5a7
CopilotAI review requested due to automatic review settings September 1, 2026 07:46

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

Review tier: Balanced
Findings: 2 Medium severity

New issues introduced by this change (2)
SeverityFinding
Medium severitysamples/​public/​Directory.Build.targets — The nested invocation always restores and builds, so the standard dotnet test --no-build and…
Medium severitysamples/​public/​Directory.Build.targets — This replacement VSTest invocation forwards only filter, logger, results directory, and list-tests.…

Comment threadsamples/public/Directory.Build.targets Outdated
Comment threadsamples/public/Directory.Build.targets Outdated
Capture no-build and restore intent separately from the suppressed SDK prebuild, forward the complete user-facing VSTest option set through a session-specific response file, and clean temporary files on success, failure, and Clean.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 480f07f9-4248-4ef6-83aa-9fae4ca1b5a7
CopilotAI review requested due to automatic review settings September 1, 2026 09:00

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

Review tier: Balanced
Findings: None

Issues resolved since last review (2)
SeverityFinding
Medium severitysamples/​public/​Directory.Build.targets — This replacement VSTest invocation forwards only filter, logger, results directory, and list-tests.… View resolved comment
Medium severitysamples/​public/​Directory.Build.targets — The nested invocation always restores and builds, so the standard dotnet test --no-build and… View resolved comment
Suppressed comments (1)

Previously missed (1) — in code that hasn't changed since the last review.

samples/public/README.md:35

  • These commands inherit the repository-root global.json, which sets test.runner to Microsoft.Testing.Platform (global.json:36-37). On .NET SDK 10+, that global selection routes both VSTest-only projects through MTP instead of the _VSTestConsole path, so the documented commands do not exercise the AppX recipes from this checkout. Add a local global.json selecting VSTest to each VSTest sample directory, mirroring the local MTP configurations.
# UWP VSTest sample
dotnet test UwpVSTestApp.csproj -p:Platform=x64
# WinUI VSTest sample
dotnet test WinUIVSTestApp.csproj -p:Platform=x64

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

Labels

state/needs-reviewAwaiting review from the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@Evangelink@0101