## Summary Move Command Palette developer documentation from \src/modules/cmdpal/doc\ to \doc/devdocs/modules/cmdpal\, consistent with the location of other module dev docs. Also updates the spell-check exclude path for the moved \.pdn\ file. Points 2 and 3 from the issue (extension settings how-to and details pane markdown documentation) are addressed in the windows-dev-docs-pr repo. Closes #38107 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2.6 KiB
Local PowerToys Extension Development
This guide is for iterating on src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.PowerToys/Microsoft.CmdPal.Ext.PowerToys.csproj.
The extension is registered through the shared sparse package defined in src/PackageIdentity/AppxManifest.xml. That manifest declares Microsoft.CmdPal.Ext.PowerToys.exe at the sparse package root, so the sparse package and the extension must be built for the same platform and configuration, for example x64\Debug.
Local development loop
-
Build
src/PackageIdentity/PackageIdentity.vcxproj.This creates
PowerToysSparse.msixin the repo output root for the selected platform and configuration, and prints theAdd-AppxPackagecommand you should run next. -
Trust the development certificate before running
Add-AppxPackage.The
PackageIdentitybuild creates or reusessrc/PackageIdentity/.user/PowerToysSparse.certificate.sample.cer.Import it into
CurrentUser\TrustedPeople:$repoRoot = "C:/git/PowerToys" Import-Certificate -FilePath "$repoRoot/src/PackageIdentity/.user/PowerToysSparse.certificate.sample.cer" -CertStoreLocation Cert:\CurrentUser\TrustedPeopleIf Windows still reports a trust failure such as
0x800B0109, also import the same certificate intoCert:\CurrentUser\TrustedRoot. -
Run the
Add-AppxPackagecommand printed by thePackageIdentitybuild.That registers
Microsoft.PowerToys.SparseAppas a sparse package and points it at the matching output root through-ExternalLocation.The command will look like this:
Add-AppxPackage -Path "<repo>\<Platform>\<Configuration>\PowerToysSparse.msix" -ExternalLocation "<repo>\<Platform>\<Configuration>" -
Build
src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.PowerToys/Microsoft.CmdPal.Ext.PowerToys.csprojin the same platform and configuration.This project writes
Microsoft.CmdPal.Ext.PowerToys.exedirectly into the sparse package root, such asx64\DebugorARM64\Debug. That matches theExecutable="Microsoft.CmdPal.Ext.PowerToys.exe"entry insrc/PackageIdentity/AppxManifest.xml. -
Restart Command Palette.
Close any running CmdPal instance and launch it again so it reloads app extensions and picks up the rebuilt
Microsoft.CmdPal.Ext.PowerToysbinaries.
When to repeat each step
- Rebuild and re-register
PackageIdentitywhen the sparse package manifest changes, the signing certificate changes, or you switch to a different output root such asARM64\Debug. - For normal code changes in
Microsoft.CmdPal.Ext.PowerToys, rebuilding the extension project and restarting CmdPal is enough.