Prerequisites
Before you start developing ImageGlass, ensure you have the following installed:Required Software
- Windows 11 (recommended for development)
- Visual Studio 2026 with the following workloads:
- .NET desktop development
- Desktop development with C++
- .NET 10 SDK (target framework:
net10.0-windows10.0.17763.0) - Git for version control
Optional Tools
- WebView2 Runtime (64-bit v119.0.2151 or later) - Required for WebView2-based features
- Windows Terminal - For a better command-line experience
- Visual Studio Code - For editing markdown and configuration files
Clone the Repository
Clone the ImageGlass repository from GitHub:develop- Contains the latest development commitsprod- Contains the final stable release
Always base your pull requests on the
develop branch, not prod.Project Structure
The ImageGlass solution is organized as follows:Open the Solution
- Navigate to the
Sourcedirectory - Open the solution in Visual Studio 2026:
- Look for the
.csprojfiles in theSource/ImageGlassdirectory - The main entry point is
ImageGlass.csproj
- Look for the
Configure Build Settings
ImageGlass supports three build configurations:- Debug - For development with debugging symbols
- Release - Optimized build for testing
- Publish_Release - Final production build
Platform Targets
- x64 - For 64-bit Intel/AMD processors
- ARM64 - For ARM64 processors
- Go to Build > Configuration Manager
- Select the desired configuration (e.g., Debug)
- Choose the platform (e.g., x64)
Build the Solution
Using Visual Studio
- Open the solution in Visual Studio 2026
- Select Build > Build Solution (or press
Ctrl+Shift+B) - Wait for the build to complete
Build Requirements from Project Files
Based on the.csproj files, ImageGlass requires:
- Target Framework:
net10.0-windows10.0.17763.0 - Windows SDK: 10.0.17763.0 or later
- Language Version: Latest C# features
- Unsafe Code: Enabled (required for performance-critical operations)
Run ImageGlass
After a successful build:- Set
ImageGlassas the startup project - Press
F5to run with debugging, orCtrl+F5to run without debugging - The application will launch and you can test your changes
Development Tips
IntelliSense and Code Analysis
ImageGlass uses several code analyzers:- IDisposableAnalyzers - Ensures proper disposal of resources
- Microsoft.VisualStudio.Threading.Analyzers - Detects threading issues
Debug Configuration
The project uses embedded debug symbols for all configurations, which makes debugging easier without separate PDB files.High DPI Support
ImageGlass is configured with:ApplicationHighDpiMode: PerMonitorV2ForceDesignerDpiUnaware: true
Next Steps
- Review the Architecture to understand the codebase structure
- Read the Contributing Guide for contribution guidelines
- Check out Building from Source for advanced build scenarios
- Learn about Translations if you want to help localize ImageGlass
Common Issues
Build Errors
If you encounter build errors:- Ensure .NET 10 SDK is installed: Check with
dotnet --list-sdks - Clean and rebuild: Go to Build > Clean Solution, then rebuild
- Check NuGet packages: Right-click solution > Restore NuGet Packages
- Verify platform target: Make sure you’re building for x64 or ARM64, not AnyCPU
Missing Dependencies
ImageGlass uses several NuGet packages that are automatically restored. If restoration fails:Getting Help
If you need help:- GitHub Issues - Report bugs or request features
- ImageGlass Discord - Chat with the community
- Email: [email protected]