Skip to main content

Quick Start Guide

This guide will help you quickly build and run Windows Calculator locally on your development machine.

Prerequisites Check

Before you begin, ensure you have:
  • Windows 11, build 22000 or newer
  • Visual Studio (Community edition or higher)
  • At least 10GB of free disk space

Get Started in 5 Minutes

1

Clone the Repository

Open your terminal or command prompt and clone the Calculator repository:
git clone https://github.com/Microsoft/calculator.git
Navigate to the cloned directory:
cd calculator
2

Open the Solution

Launch Visual Studio and open the solution file:
src\Calculator.sln
You can also open it directly from File Explorer by double-clicking the .sln file.
3

Restore NuGet Packages

Visual Studio should automatically restore NuGet packages when you open the solution. If not, right-click on the solution in Solution Explorer and select Restore NuGet Packages.
4

Build the Solution

Build the solution using one of these methods:
  • Press F6 or Ctrl+Shift+B
  • From the menu: Build → Build Solution
  • Right-click the solution and select Build Solution
The first build may take several minutes as Visual Studio compiles all projects and dependencies.
5

Run the Application

Start the Calculator app:
  • Press F5 to run with debugging
  • Press Ctrl+F5 to run without debugging
  • From the menu: Debug → Start Debugging or Debug → Start Without Debugging
The Windows Calculator application should launch on your machine.

Verify Your Setup

Once the application launches, verify that everything is working:
  1. Standard Calculator: Perform a basic calculation (e.g., 2 + 2 = 4)
  2. Switch Modes: Use the navigation menu to switch between Standard, Scientific, and Programmer modes
  3. Test Converters: Try the unit converter with a simple conversion

Build Configurations

Windows Calculator supports multiple build configurations:
ConfigurationDescription
DebugIncludes debugging symbols, no optimizations. Use for development.
ReleaseOptimized build without debugging symbols. Use for testing performance.
Diagnostic data is disabled in development builds by default. You can enable it with the SEND_DIAGNOSTICS build flag if needed.

Platform Targets

You can build for different platforms:
  • x64: 64-bit Windows (recommended for most modern systems)
  • x86: 32-bit Windows
  • ARM64: ARM-based Windows devices
Select your target platform from the toolbar in Visual Studio before building.

Common Issues

If you encounter build errors, ensure:
  • You have the latest Windows 11 SDK installed
  • The “Universal Windows Platform Development” workload is installed
  • The “C++ Universal Windows Platform tools” optional component is installed

Missing SDK Error

If you see errors about missing Windows SDK:
  1. Open Visual Studio Installer
  2. Modify your Visual Studio installation
  3. Install the latest Windows 11 SDK

NuGet Restore Failed

If NuGet package restoration fails:
  1. Check your internet connection
  2. Clear the NuGet cache: Tools → NuGet Package Manager → Package Manager Settings → Clear All NuGet Cache(s)
  3. Restore packages again

Next Steps

Now that you have Calculator running:

Explore the Architecture

Learn about the MVVM design pattern and project structure

Contributing Guidelines

Start contributing to the project

Run UI Tests

Set up and run automated UI tests

Code Style Guide

Understand the coding standards and style guidelines

Running UI Tests

To run the UI tests, you need to install Windows Application Driver (WinAppDriver):
  1. Download the latest release from WinAppDriver releases
  2. Install WinAppDriver on your system
  3. Run the UI test projects from Visual Studio Test Explorer

Development Tips

  • XAML Hot Reload: Visual Studio supports XAML Hot Reload, allowing you to see UI changes without rebuilding
  • Debugging: Use breakpoints in both C++ and C# code for effective debugging
  • IntelliSense: Take advantage of IntelliSense for code completion and documentation
For detailed installation instructions and advanced setup options, see the Installation Guide.

Build docs developers (and LLMs) love