Prerequisites
Required Software
- .NET 10 SDK - Download
- Git - For cloning the repository
- IDE (choose one):
- Visual Studio 2022 17.8+ (Windows)
- JetBrains Rider 2024.3+ (Cross-platform)
- VS Code with C# Dev Kit extension
Optional Tools
- GitHub CLI (
gh) - For creating PRs - PowerShell 7+ - For running setup scripts
System Requirements
Windows:- Windows 10 1809+ (build 17763) or Windows 11
- 512MB RAM minimum, 1GB recommended
- ~500MB disk space for dependencies
- Supported by Avalonia but not actively tested
- See Technology Stack for platform details
Getting the Code
Clone Repository
Branch for Development
Never commit directly tomain. Always create a feature branch:
Building the Application
Build All Projects
Build Specific Project
Clean Build
Restore Dependencies
Running the Application
Run from Source
Run with Debugger
Visual Studio:- Open
Intune.Commander.sln - Set
Intune.Commander.Desktopas startup project - Press F5 or click “Start Debugging”
- Open folder in VS Code
- Install C# Dev Kit extension
- Press F5 or use Run and Debug panel
- Open
Intune.Commander.sln - Right-click
Intune.Commander.Desktop→ “Run”
Application Data Locations
During development, the app stores data in: Windows:- Profiles:
%LOCALAPPDATA%\Intune.Commander\profiles.json - Cache:
%LOCALAPPDATA%\Intune.Commander\cache.db - Encryption keys:
%LOCALAPPDATA%\Intune.Commander\keys\
- Profiles:
~/.config/Intune.Commander/profiles.json - Cache:
~/.config/Intune.Commander/cache.db - Encryption keys:
~/.config/Intune.Commander/keys/
- Profiles:
~/Library/Application Support/Intune.Commander/profiles.json - Cache:
~/Library/Application Support/Intune.Commander/cache.db - Encryption keys:
~/Library/Application Support/Intune.Commander/keys/
Running Tests
Unit Tests Only (Fast)
Unit Tests with Coverage
Integration Tests (Slow)
Integration tests require Azure credentials: Windows (PowerShell):Run Specific Test
Run All Tests
Publishing Release Builds
Self-Contained Windows Executable
Framework-Dependent Build
Publish with Syncfusion License
Other Platforms
Development Workflow
Typical Development Cycle
-
Create feature branch:
- Make changes in your IDE
-
Build and test frequently:
-
Run the app to verify:
-
Check coverage before committing:
-
Commit changes:
-
Push and create PR:
Debugging Tips
Enable Avalonia DevTools (Debug builds only): Press F12 while app is running to open Avalonia DevTools:- Visual tree inspector
- Property editor
- Event viewer
- Style debugger
- Menu: View → Debug Log
- Shows last 2000 log entries
- All Graph API calls logged here
src/Intune.Commander.Desktop/Services/DebugLogService.cs.
Verbose logging:
Hot Reload
.NET Hot Reload is supported for code changes: Visual Studio:- Automatic hot reload while debugging
- Look for “Hot Reload” icon in toolbar
- May require manual restart for some changes
- Avalonia XAML hot reload is supported in Visual Studio
- Install Avalonia for Visual Studio extension
CI/CD Workflows
CI — Test & Coverage
Trigger: All pushes + PRs to main File:.github/workflows/ci-test.yml
What it does:
- Setup .NET 10 SDK
- Restore dependencies
- Build in Release mode
- Run unit tests (excludes integration tests)
- Enforce 40% line coverage
- Upload coverage report as artifact
CI — Integration Tests
Trigger: Push/PR to main + manual dispatch File:.github/workflows/ci-integration.yml
What it does:
- Setup .NET 10 SDK
- Restore dependencies
- Build solution
- Run integration tests with credentials from secrets
AZURE_TENANT_IDAZURE_CLIENT_IDAZURE_CLIENT_SECRET
Build Release
Trigger: All pushes + PRs File:.github/workflows/build-release.yml
What it does:
- Build self-contained Windows x64 executable
- Upload artifact
- Go to Actions tab in GitHub
- Click on workflow run
- Download “Intune.Commander-win-x64” artifact
Troubleshooting
Build Errors
“SDK version not found”:- Windows has path length limits (~260 chars)
- Clone repo to shorter path (e.g.,
C:\src\intune-commander) - Or enable long paths:
git config --system core.longpaths true
Test Errors
“Coverage threshold not met”:- Environment variables not set
- Set
AZURE_TENANT_ID,AZURE_CLIENT_ID,AZURE_CLIENT_SECRET - Run
Setup-IntegrationTestApp.ps1first
Runtime Errors
“profiles.json access denied”:- Close any other instances of the app
- Check folder permissions:
%LOCALAPPDATA%\Intune.Commander\
- Check tenant ID and client ID are correct
- Verify app registration has required permissions
- Check cloud environment matches (Commercial vs GCC-High vs DoD)
- Delete token cache:
%LOCALAPPDATA%\.IdentityService\ - Sign in again
IDE Configuration
Visual Studio 2022
Recommended extensions:- Avalonia for Visual Studio (XAML preview and hot reload)
- GitHub Copilot (optional)
Intune.Commander.sln
Startup project: Intune.Commander.Desktop
JetBrains Rider
Recommended plugins:- AvaloniaRider (XAML support)
- .NET Core User Secrets (manage secrets)
Intune.Commander.sln
VS Code
Required extensions:- C# Dev Kit (Microsoft)
- C# (Microsoft)
- Avalonia for VSCode (XAML support)
- GitLens (Git integration)
.vscode/tasks.json (if present)
Project Structure Reference
Related Documentation
- Architecture Overview - Core architecture and decisions
- Technology Stack - Dependencies and versions
- Services - Service patterns and Graph API
- Testing - Unit and integration test guide
- Contributing - PR guidelines and code standards