Prerequisites
Before you can build Calculator, ensure your development environment meets these requirements:Your computer must be running Windows 11, build 22000 or newer to build and run Calculator.
Install Visual Studio
Download and install the latest version of Visual Studio. The free Community edition is sufficient.During installation, make sure to install:
- Universal Windows Platform Development workload
- C++ Universal Windows Platform tools component (optional)
-
Latest Windows 11 SDK
Install XAML Styler Extension
Install the XAML Styler Visual Studio extension for consistent XAML formatting.
Building with Visual Studio
The simplest way to build Calculator is using the Visual Studio IDE:Select Platform and Configuration
Choose your target platform from the toolbar:
- x64 - For 64-bit Intel/AMD processors
- x86 - For 32-bit Intel/AMD processors
- ARM64 - For ARM-based devices
- Debug - For development with debugging symbols
- Release - For optimized production builds
Build the Solution
Press F7 or select Build > Build Solution from the menu.The build output will appear in the Output window. A successful build will show:
Building with MSBuild
For command-line builds or CI/CD pipelines, use MSBuild directly:Solution Structure
The Calculator solution contains multiple projects:| Project | Type | Description |
|---|---|---|
| Calculator | C# UWP App | Main application UI and entry point |
| CalcManager | C++ Library | Core calculation engine |
| CalcViewModel | C++ Library | View models for MVVM pattern |
| GraphControl | C++ Library | Graphing calculator controls |
| GraphingImpl | C++ Library | Mock graphing engine implementation |
| CalculatorUnitTests | C++ Test | Unit tests for core components |
| CalculatorUITests | C# Test | UI automation tests |
| CalculatorUITestFramework | C# Library | Test framework and utilities |
Platform Support
Calculator supports three platforms:Build Configurations
Debug Configuration
- Includes debugging symbols
- Minimal optimization
- Assertions enabled
- Diagnostic data disabled by default
Release Configuration
- Full optimization
- No debugging symbols
- Assertions disabled
- Diagnostic data disabled in developer builds
Diagnostic data collection can be enabled with the
SEND_DIAGNOSTICS build flag, but is disabled by default in development builds.Continuous Integration
The Calculator project uses GitHub Actions for CI/CD. The workflow:- Defines builds - Determines which platforms to build based on PR vs. main branch
- Builds - Compiles for x64, x86, and ARM64 (x64 only for PRs)
- Runs unit tests - Executes CalculatorUnitTests on x64 and x86
- Runs UI tests - Executes CalculatorUITests on x64
Troubleshooting
Build Errors
Missing Windows SDKPerformance Tips
- Use
-maxCpuCountwith MSBuild to enable parallel compilation - Build only the platform you need during development (typically x64)
- Use incremental builds when making small changes
- Consider using a RAM disk for faster builds on systems with sufficient memory
Next Steps
Running Tests
Learn how to run unit tests and UI tests
Debugging
Set up debugging tools and techniques