Prerequisites
Before building ImageGlass, ensure you have:- Windows 11 (Windows 10 version 1809 or later also supported)
- Visual Studio 2026 with:
- .NET desktop development workload
- Desktop development with C++ workload
- .NET 10 SDK installed
- Git for cloning the repository
Clone the Repository
Branch Strategy
develop- Active development branch (use this for contributions)prod- Stable production releases
Always base your work on the
develop branch unless you’re applying a hotfix.Project Configuration
Target Framework
All ImageGlass projects target:- .NET 10 SDK
- Windows SDK 10.0.17763.0 or later
Platform Support
ImageGlass supports two platforms:- x64 - 64-bit Intel/AMD processors
- ARM64 - ARM64 processors (e.g., Surface Pro X, Windows Dev Kit)
Build Configurations
- Debug - For development with full debugging symbols
- Release - Optimized build for testing
- Publish_Release - Production build with all optimizations
Building with Visual Studio
Step 1: Open the Solution
- Navigate to
Source/ImageGlass/ - Open
ImageGlass.csprojin Visual Studio 2026 - Visual Studio will automatically discover all related projects
Step 2: Restore NuGet Packages
Visual Studio should automatically restore packages. If not:- Right-click on the solution in Solution Explorer
- Select Restore NuGet Packages
Step 3: Select Configuration and Platform
- In the toolbar, select a configuration (e.g., Debug)
- Select a platform (e.g., x64)
Step 4: Build
Option 1: Build Solution- Menu: Build > Build Solution
- Keyboard:
Ctrl+Shift+B
- Right-click a project in Solution Explorer
- Select Build
Build Output Location
Built binaries are located at:Building from Command Line
Using MSBuild
Using .NET CLI
Build Process Details
NuGet Dependencies
ImageGlass relies on several NuGet packages:Main Application (ImageGlass.csproj)
- D2Phap.FileWatcherEx (3.0.0) - File system monitoring
- ImageGlass.Tools (1.9200.2) - Utility tools
- IDisposableAnalyzers (4.0.8) - Code analysis for proper disposal
- Microsoft.VisualStudio.Threading.Analyzers (17.14.15) - Threading analyzers
ImageGlass.Base Component
- Magick.NET-Q16-HDRI-OpenMP (14.10.3) - ImageMagick for .NET
- Platform-specific:
-arm64or-x64
- Platform-specific:
- Magick.NET.SystemDrawing (8.0.16)
- Magick.NET.SystemWindowsMedia (8.0.16)
- Microsoft.Web.WebView2 (1.0.2151.40) - WebView2 runtime
- Microsoft.Windows.CsWin32 (0.3.269) - Windows API source generation
- PhotoSauce.MagicScaler (0.15.0) - High-performance image scaling
- DirectNStandard (1.18.0) - Direct2D/DirectX interop
- WicNet (1.8.4.1) - Windows Imaging Component
- ZString (2.6.0) - Zero-allocation string operations
- D2Phap.EggShell (platform-specific)
ImageGlass.Settings Component
- Microsoft.Extensions.Configuration (10.0.3)
- Microsoft.Extensions.Configuration.Binder (10.0.3)
- Microsoft.Extensions.Configuration.CommandLine (10.0.3)
- Microsoft.Extensions.Configuration.Json (10.0.3)
Post-Build Steps
The main ImageGlass project has automatic post-build steps defined inImageGlass.csproj:
- Themes from
Setup/Assets/Themes/to output - Language packs from
Setup/Assets/Language/to output - WebUI assets from Settings component to output
Clean Build
The project defines a custom clean target:igconfig.json during clean operations.
To perform a clean build:
Building Individual Components
You can build components independently:ImageGlass.Base
ImageGlass.UI
ImageGlass.Viewer
igcmd (Command-Line Tool)
Advanced Build Scenarios
Building for Multiple Platforms
Build for both x64 and ARM64:Build with Specific Version
Version is defined in the.csproj file:
Publish Build
For distribution-ready builds:Troubleshooting
Build Errors
Error: SDK not found
Problem: .NET 10 SDK not installed Solution:Error: Platform ‘AnyCPU’ not supported
Problem: Wrong platform selected Solution: ImageGlass only supports x64 and ARM64. Select one of these platforms in Visual Studio or specify in the command line:Error: Package restore failed
Problem: NuGet packages cannot be downloaded Solution:Error: Windows SDK not found
Problem: Required Windows SDK version not installed Solution: Install Windows SDK 10.0.17763.0 or later through Visual Studio Installer:- Open Visual Studio Installer
- Modify your Visual Studio installation
- Go to Individual components
- Search for “Windows 10 SDK”
- Select version 10.0.17763.0 or later
Missing Files After Build
Missing Themes/Language files
Problem: Post-build copy step failed Solution: Verify the paths exist:Performance Issues
Slow build times
Solutions:- Build only changed projects (not full solution)
- Disable antivirus scanning on the source directory
- Use SSD for source code storage
- Increase RAM available to MSBuild:
Debug vs Release Performance
Debug builds include:- Full debugging symbols (embedded)
- No optimizations
- Additional runtime checks
- Optimized code
- Smaller binary size
- Better performance
Continuous Integration
For automated builds, refer to GitHub Actions workflows in.github/workflows/ (if available).
Next Steps
- Architecture - Understand the codebase structure
- Contributing Guide - Submit your changes
- Getting Started - Development environment setup