Prerequisites
Before building PowerToys, ensure your development environment meets these requirements:System Requirements
- Windows 10 April 2018 Update (version 1803) or newer
- Long paths enabled in Windows (see instructions)
- Windows Developer Mode enabled
Required Software
Visual Studio 2022 17.4+ or Visual Studio 2026 with the following workloads:- Desktop Development with C++
- WinUI application development
- .NET desktop development
- Windows 10 SDK (10.0.22621.0)
- Windows 11 SDK (10.0.26100.3916)
- .NET 8 SDK
- Git (for cloning and submodule management)
Initial Setup
Automated Setup (Recommended)
Run the automated setup script from the repository root:- Enable Windows long path support (requires administrator privileges)
- Enable Windows Developer Mode (requires administrator privileges)
- Guide you through installing required Visual Studio components from
.vsconfig - Initialize git submodules
-Help to see all available options.
Manual Setup
If you prefer manual setup:-
Import Visual Studio components:
- Open Visual Studio Installer
- Import the
.vsconfigfile from the repository root - Or open
PowerToys.slnxand click “install extra components” if prompted
-
Initialize submodules:
Build Methods
Building with Visual Studio
- Open
PowerToys.slnxin Visual Studio - Select configuration from the Solutions Configuration dropdown:
Debug- For development and debuggingRelease- For production builds
- Build the solution:
- Menu: Build > Build Solution
- Keyboard:
Ctrl+Shift+B
x64\Release\for Release buildsx64\Debug\for Debug builds
You can run
x64\Release\PowerToys.exe directly without installing, but some modules (PowerRename, ImageResizer, File Explorer extensions) require building and installing the full installer to function properly.Building from Command Line
PowerToys provides several build scripts intools\build\ for command-line builds:
Quick Build (Essentials)
For faster iteration during development, build only the runner and settings:Full Solution Build
Build any projects in the current directory:Build with Installer
To build the complete installer package (Release only):Using MSBuild Directly
For advanced scenarios, use MSBuild directly from Developer Command Prompt:Build Configurations
Debug vs Release
| Configuration | Use Case | Optimizations | Debug Info | Performance |
|---|---|---|---|---|
| Debug | Development, debugging | Disabled | Full | Slower |
| Release | Production, installer | Enabled | Minimal | Optimized |
Platform Options
- x64 - Intel/AMD 64-bit processors (most common)
- ARM64 - ARM-based Windows devices
Build Logs and Output
Build logs are created next to the solution/project being built:| Log File | Contents |
|---|---|
build.<config>.<platform>.errors.log | Errors only (check this first) |
build.<config>.<platform>.warnings.log | Warnings only |
build.<config>.<platform>.all.log | Complete build output |
build.<config>.<platform>.trace.binlog | Binary log for MSBuild Structured Log Viewer |
Common Build Errors
Submodules Not Initialized
Error: Missing dependencies or file not found errors Solution:Missing NuGet Packages
Error: NuGet package restore failures Solution:Missing Image Files or Assets
Error: Build errors about missing.png, .ico, or other asset files
Solution: Clean and rebuild
Visual Studio Environment Not Found
Error: Cannot find Visual Studio or MSBuild Solution:- Ensure Visual Studio is installed with required workloads
- Run from “Developer PowerShell for VS 2022” or “Developer Command Prompt for VS”
- Verify
vswhere.exeexists inC:\Program Files (x86)\Microsoft Visual Studio\Installer
Long Path Issues
Error: File path too long errors Solution: Enable long paths in Windows:Unsigned DLLs/Executables
Error: Pipeline fails with unsigned DLL/executable errors Solution:- For PowerToys modules: Add them to the signing configuration
- For external libraries: Verify they’re safe before adding to signing list
- Check the signing JSON file in the repository
Build Performance Tips
Faster Iteration
-
Use essentials build for quick testing of runner and settings:
-
Build specific projects by navigating to the project folder:
-
Parallel builds with MSBuild
-mflag:
Reduce Disk Usage
Clean build artifacts periodically:Building Individual Components
Building a Specific Module
Building the Installer Only
Prerequisites:- Build
PowerToys.slnxin Release mode - Build
tools\BugReportTool\BugReportTool.sln - Build
tools\StylesReportTool\StylesReportTool.sln
Git Worktree Workflow
For working on multiple features simultaneously, use git worktrees:tools\build\Worktree-Guidelines.md for detailed instructions.
Next Steps
Debugging
Learn how to debug PowerToys modules and troubleshoot issues
Testing
Write and run tests for your PowerToys contributions
Creating New Utility
Step-by-step guide to create a new PowerToys utility
Coding Style
Follow PowerToys coding standards and conventions