Skip to main content

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)
Additional Components:
  • .NET 8 SDK
  • Git (for cloning and submodule management)
You can automatically install Visual Studio with all required components using WinGet configuration files:
Choose the file matching your Visual Studio edition (Professional, Enterprise, etc.).

Initial Setup

Run the automated setup script from the repository root:
This script will:
  • 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
Run with -Help to see all available options.

Manual Setup

If you prefer manual setup:
  1. Import Visual Studio components:
    • Open Visual Studio Installer
    • Import the .vsconfig file from the repository root
    • Or open PowerToys.slnx and click “install extra components” if prompted
  2. Initialize submodules:
Submodule initialization is a one-time step required before you can compile most parts of PowerToys. Failure to initialize submodules will result in build errors.

Build Methods

Building with Visual Studio

  1. Open PowerToys.slnx in Visual Studio
  2. Select configuration from the Solutions Configuration dropdown:
    • Debug - For development and debugging
    • Release - For production builds
  3. Build the solution:
    • Menu: Build > Build Solution
    • Keyboard: Ctrl+Shift+B
Build output will be located in:
  • x64\Release\ for Release builds
  • x64\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 in tools\build\ for command-line builds:

Quick Build (Essentials)

For faster iteration during development, build only the runner and settings:
Options:

Full Solution Build

Build any projects in the current directory:

Build with Installer

To build the complete installer package (Release only):
Installer Options:
The installer can only be built in Release mode. Debug installers are not supported.

Using MSBuild Directly

For advanced scenarios, use MSBuild directly from Developer Command Prompt:

Build Configurations

Debug vs Release

Platform Options

  • x64 - Intel/AMD 64-bit processors (most common)
  • ARM64 - ARM-based Windows devices
The build scripts auto-detect your platform if not specified. Override with -Platform parameter when needed.

Build Logs and Output

Build logs are created next to the solution/project being built: Example locations:
Use MSBuild Structured Log Viewer to analyze .binlog files for detailed build investigation.

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
Or manually:

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.exe exists in C:\Program Files (x86)\Microsoft Visual Studio\Installer

Long Path Issues

Error: File path too long errors Solution: Enable long paths in Windows:
Or use the automated setup script which handles this for you.

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

  1. Use essentials build for quick testing of runner and settings:
  2. Build specific projects by navigating to the project folder:
  3. Parallel builds with MSBuild -m flag:

Reduce Disk Usage

Clean build artifacts periodically:

Building Individual Components

Building a Specific Module

Building the Installer Only

Prerequisites:
  1. Build PowerToys.slnx in Release mode
  2. Build tools\BugReportTool\BugReportTool.sln
  3. Build tools\StylesReportTool\StylesReportTool.sln
Then:
Or use the all-in-one script:

Git Worktree Workflow

For working on multiple features simultaneously, use git worktrees:
See 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