test-on-vm
Skill8.5k starsChanged 2 months agoMITView on GitHub
EXPERIMENTAL. Run locally built WinUI interaction tests on a Hyper-V VM through PowerShell Direct. Use when asked to run WinUI tests on a local VM.
Trending
Quiet since August.about the whole repository
Who's talking about microsoft/microsoft-ui-xaml
- dotnet/maui“Cross platform UX for .NET 5”GitHub · Jul 18, 2017 · 217 reactions
- A Hacker News story“WinUI 3 Performance: A Leap Forward”Hacker News · May 14, 2026 · 121 points
- xamarin/Xamarin.Forms“Proposal: Simplify Grid Column and Row Definitions”GitHub · Aug 28, 2019 · 67 reactions
- dotnet/maui“[Enhancement] Cross platform media player”GitHub · Aug 27, 2021 · 44 reactions
- dotnet/maui“Support Global Exception Handling Mechanism for .NET MAUI”GitHub · Mar 23, 2022 · 41 reactions
The biggest 5 of 24 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 24
Talked about on GitHub, Hacker News and Bluesky (24 times).
On GitHub · 12
- Jul 18, 2017Cross platform UX for .NET 5 — dotnet/maui217 reactions · 31 comments
- Aug 28, 2019Proposal: Simplify Grid Column and Row Definitions — xamarin/Xamarin.Forms67 reactions · 13 comments
- Aug 27, 2021[Enhancement] Cross platform media player — dotnet/maui44 reactions · 23 comments
- Mar 23, 2022Support Global Exception Handling Mechanism for .NET MAUI — dotnet/maui41 reactions · 14 comments
- Apr 26, 2019Adds UWP support to Shell — xamarin/Xamarin.Forms39 reactions · 45 comments
7 more on GitHub
- Aug 28, 2019Proposal: Simplify Grid Column and Row Definitions — dotnet/wpf35 reactions · 7 comments
- Jun 22, 2019Support using Win2D with WinUI — microsoft/Win2D35 reactions · 28 comments
- May 19, 2020[WinUI3] Windows Community Toolkit 7.0.1 for Project Reunion 0.5 — CommunityToolkit/WindowsCommunityToolkit30 reactions · 49 comments
- Mar 18, 2020Proposal: Allow the App to Print without showing the Confirmation Dialog to user — microsoft/WindowsAppSDK28 reactions · 47 comments
- Oct 8, 2022Windows Unpackaged support in .NET MAUI — dotnet/maui27 reactions · 4 comments
- May 29, 2020Discussion: Decouple MSIX from AppContainer — microsoft/WindowsAppSDK26 reactions · 14 comments
- Aug 22, 2021BlazorWebView drag and drop does not work with MAUI Templates — dotnet/maui24 reactions · 96 comments
On Hacker News · 11
- May 14, 2026WinUI 3 Performance: A Leap Forward121 points · 141 comments
- Oct 25, 2023WinUI3 Source Available4 points
- Feb 13, 2022Dependency property is much slower in WinUI 3 than in WPF4 points
- Jul 1, 2019Windows UI Library Roadmap4 points
- Oct 25, 2023WinUI 3 is now open source3 points
6 more on Hacker News
- Aug 29, 2026WinUI development is now happening on GitHub2 points
- May 26, 2024Is WinUI 3 Dead?2 points
- Nov 13, 2019Windows UI Library Roadmap Update2 points
- Nov 6, 2019First WinUI 3.0 Alpha now available2 points
- Aug 2, 2025WinUI OSS Update: Phased Rollout Toward Open Collaboration1 point
- Jul 23, 2024Windows UI Library1 point
On Bluesky · 1
- Jan 26, 2025Over here: github.com/microsoft/mi... — @dotmorten.xaml.dev1 likes and repost · 1 reply
In this repository6 other files it gives its agents.
- Samples/TableViewSampleApp/AGENTS.mdAGENTS.md
- src/.github/copilot-instructions.mdCopilot instructions
- buildSkill
- code-reviewSkill
- bt-buildSkill
- test-suite-setupSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 8
Run tools\run-tests-on-vm.ps1 through initrun.ps1.
- Very specific: line 28
If Hyper-V permissions are missing, stop and ask the user to make the change themselves.
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Run WinUI Tests on a Hyper-V VM
Run tools\run-tests-on-vm.ps1 through initrun.ps1. It refreshes the local
test payload, deploys it to the VM, performs required machine setup, and runs
tests on the VM's interactive desktop.
This skill and script are experimental and may not be stable.
Before You Run
Build the repository first. Follow the build skill:
.\initrun.ps1 .\build.cmd /qAlso verify:
- The VM is running with an unlocked desktop and a logged-in user.
- The caller is a local admin or a member of Hyper-V Administrators.
- The command uses
initial_waitof at least 180 seconds.
If Hyper-V permissions are missing, stop and ask the user to make the change
themselves. Never run Add-LocalGroupMember or open an elevated shell on their
behalf, even with their approval.
Tell the user to run whoami in their original, non-elevated PowerShell window
and copy the account name. Then have them open a separate PowerShell (pwsh)
window using Run as administrator and run this command, replacing
<account-from-whoami> with the copied name:
Add-LocalGroupMember -Group 'Hyper-V Administrators' -Member '<account-from-whoami>'Tell the user to sign out and back in afterward. Wait for them to confirm they have completed these steps before retrying the test.
The first run prompts for VM credentials in a separate window and caches them
encrypted under ~\.winui-test. Use -ResetCredential to replace them.
Run Tests
# Run a specific test
.\initrun.ps1 .\tools\run-tests-on-vm.ps1 -VMName <vm> <testname>
# Wildcard match
.\initrun.ps1 .\tools\run-tests-on-vm.ps1 -VMName <vm> *CommandBar*
# Force full copy instead of incremental
.\initrun.ps1 .\tools\run-tests-on-vm.ps1 -VMName <vm> -FullCopy <testname>
# Stop a stuck test run
.\initrun.ps1 .\tools\run-tests-on-vm.ps1 -VMName <vm> -StopPayload Rules
By default, the script runs test\CreateTestPayload.ps1 to refresh
TestPayload\<flavor> from the current build outputs, then deploys changed
files incrementally.
-FullCopystill refreshes the local payload, then copies all of it to the VM.- Use
-SkipPayloadrarely. It deploys the existing local payload without refreshing it. Use it only when that payload is known to be current or when intentionally testing stale binaries. Never use it merely to save time.
Useful Options
| Option | Purpose |
-Platform | x86, x64, or arm64; uses $env:BUILDPLATFORM, then defaults to x64 |
-Configuration | chk or fre; uses $env:_BuildType, then defaults to chk |
-FullCopy | Copy the full refreshed payload instead of only changes |
-SkipPayload | Rare: deploy the existing payload without refreshing it |
-SkipPrerun | Skip testmachine-prerun.cmd |
-ForcePrerun | Run testmachine-prerun.cmd again |
-Credential | Supply a PSCredential instead of using the prompt/cache |
-ResetCredential | Clear the cached credential for this VM |
-Stop | Stop the active test and clean up |
Troubleshooting
| Symptom | Cause | Fix |
Could not launch app, foreground-window errors, or an empty UIA tree | VM desktop is locked or not visible | Keep the VM desktop unlocked and active |
Failed to connect to VM | VM not running or wrong credentials | Start the VM; use -ResetCredential to re-enter credentials |
| Permission error | Need Hyper-V Administrators membership | Stop and have the user follow the permission steps above |
| Incomplete payload or prerun failure | Stale payload or partial deployment | Omit -SkipPayload; retry with -FullCopy if needed |
Crash Dumps
The first prerun configures full crash dumps under C:\dumps on the VM, with
up to three dumps per process. Pull one back through PowerShell Direct:
$vmName = "<vm>"
$credentialKey = $vmName -replace '[^a-zA-Z0-9]', '_'
$cred = Import-Clixml (Join-Path $env:USERPROFILE ".winui-test\vmcred-$credentialKey.xml")
$destination = Join-Path $env:TEMP "WinUIDumps"
New-Item -ItemType Directory -Path $destination -Force | Out-Null
$session = New-PSSession -VMName $vmName -Credential $cred
try {
Invoke-Command -Session $session { Get-ChildItem C:\dumps\*.dmp }
Copy-Item -FromSession $session -Path "C:\dumps\<dump>.dmp" -Destination $destination
}
finally {
Remove-PSSession $session
}For a quick local analysis:
cdb -z "$env:TEMP\WinUIDumps\<dump>.dmp" -c "!analyze -v; ~*k; q"Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

