This is a template for Visual Studio to create a PowerToys Run plugin.
- gsudo
Or if you're using Windows later than Windows 11 24H2, changesudo {...}
indebug.ps1
tosudo powershell {...}
.
- Download the latest release.
- Move the zip to
~\Documents\Visual Studio 2022\Templates\ProjectTemplates
. - Change
$ptPath
indebug.ps1
to your PowerToys install location, i.e.$env:LOCALAPPDATA\PowerToys
for user scope install. - Open Visual Studio 2022 and select the template named
PowerToys Run Plugin Template
. - Follow TODOs in
Main.cs
.
copyLib.ps1
- copy dependencies.debug.ps1
- move debug files to destination.release.ps1
- create release on github with github cli.
- Build the project.
- Run
debug.ps1
. - Attach to the process
PowerToys.PowerLauncher
.
Check ProcessKiller.
MyPlugin
│ MyPlugin.sln
└───MyPlugin
│ copyLib.ps1
│ debug.ps1
│ .editorconfig
│ MyPlugin.csproj
│ Main.cs
│ plugin.json
│ README.md
│ release.ps1
├───Images
│ Icon.dark.png
│ Icon.light.png
├───Lib
└───Properties
Resources.Designer.cs
Resources.resx
Visual Studio 2022 caches the templates, so you can't simply replace the zip file.
- Remove previous versions of the template.
- Start Visual Studio 2022 then select
Create a new project
, this loads the templates. - Close Visual Studio 2022 or click
Back
. - Move the new zip to
~\Documents\Visual Studio 2022\Templates\ProjectTemplates
.
If you have any suggestions or improvements, feel free to open an issue or a pull request.