Runtime & Language
| Technology | Version | Purpose |
|---|---|---|
| .NET | 10.0 (LTS) | Runtime platform (LTS through November 2026) |
| C# | 12 | Primary language with modern features |
| Target Framework | net10.0 | All projects target .NET 10 |
C# 12 Features Used
- Primary constructors: Simplified constructor syntax
- Collection expressions:
[]syntax for arrays and lists - Required members: Enforced initialization of properties
- File-scoped namespaces: Reduced indentation
- Nullable reference types: Enabled in all projects
Core Dependencies
Fromsrc/Intune.Commander.Core/Intune.Commander.Core.csproj:
Authentication & Graph API
- Modern Microsoft-recommended authentication library
- Provides
TokenCredentialabstraction - Supports multiple credential types:
InteractiveBrowserCredential- Browser-based interactive authClientSecretCredential- Service principal authentication
- Multi-cloud support via
AuthorityHostconfiguration - Replaces direct MSAL usage
- Important: Uses the Beta SDK, not the stable
Microsoft.Graphpackage - All Graph models come from
Microsoft.Graph.Beta.Models GraphServiceClientfromMicrosoft.Graph.Beta- Provides access to latest Intune management APIs
- Required for many Intune configuration types not in stable API
Data & Storage
- Embedded NoSQL database
- Used for caching Graph API responses
- AES-encrypted database file
- Located at
%LOCALAPPDATA%\Intune.Commander\cache.db - 24-hour default TTL per cache entry
- Keyed by tenant ID + data type
- Cross-platform encryption API
- Encrypts profile storage (
profiles.json) - Encrypts LiteDB cache password (
cache-key.bin) - DPAPI-protected keys on Windows
- File-system protected on macOS/Linux
- Keys stored at
%LOCALAPPDATA%\Intune.Commander\keys
Dependency Injection
- Standard .NET dependency injection container
- Used to register services at startup
- Configured in
ServiceCollectionExtensions.AddIntuneCommanderCore()
- Singleton:
IAuthenticationProvider,IntuneGraphClientFactory,ProfileService,IProfileEncryptionService,ICacheService - Transient:
IExportService,MainWindowViewModel - Not in DI: Graph API services (created post-authentication in
MainWindowViewModel)
Office Document Generation
- PowerPoint document generation
- Used for exporting Conditional Access policies to PPTX
- Requires license key (baked into binary at publish time)
- License key passed via
-p:SyncfusionLicenseKey=<value>in CI
Desktop UI Dependencies
Fromsrc/Intune.Commander.Desktop/Intune.Commander.Desktop.csproj:
Avalonia Framework
- Cross-platform UI framework
- XAML-based (
.axamlfiles) - Supports Windows, macOS, Linux
- Modern, performant alternative to WPF
- Compile-time bindings enabled:
AvaloniaUseCompiledBindingsByDefault=true
- Desktop-specific platform implementations
- Window management, file dialogs, clipboard support
- DataGrid control for displaying tables of data
- Used extensively in main views for listing policies, profiles, etc.
- Development-time debugging tools
- Only included in Debug builds
- Removed from Release builds via conditional
IncludeAssets
MVVM Framework
- Source generator-based MVVM framework
- Generates boilerplate code at compile time
- Key attributes:
[ObservableProperty]- Generates property withINotifyPropertyChanged[RelayCommand]- GeneratesICommandimplementation
- ViewModels must be
partial classfor source generators
Charts & Visualization
- Modern charting library for Avalonia
- Uses SkiaSharp for rendering
- Used in Overview dashboard for visualization
- Displays policy counts, compliance stats, etc.
UI Components & Styling
- Material Design icon library
- Provides vector icons for UI
- Modern UI theme and control library for Avalonia
- Provides styled controls and theme support
- Used for consistent, modern UI appearance
Office Document Generation (Desktop)
Testing Dependencies
Fromtests/Intune.Commander.Core.Tests/Intune.Commander.Core.Tests.csproj:
Test Framework
- Primary test framework
- Uses
[Fact]for simple tests - Uses
[Theory]for parameterized tests - Integration test tagging:
[Trait("Category", "Integration")]
Mocking
- Mocking library for unit tests
- Clean, simple syntax
- Used for mocking interfaces
GraphServiceClient is NOT mockable (sealed SDK). Services that directly call Graph use reflection-based contract tests instead. NSubstitute is only used for project-owned interfaces (IXxxService, ICacheService, etc.).
NSubstitute Patterns:
Code Coverage
- Code coverage tool for .NET
- Integrated with CI pipeline
- Enforces 40% line coverage threshold
- Outputs Cobertura format
Supporting Dependencies
Development Tools
IDE Support
- Visual Studio 2022 17.8+ - Full support with .NET 10 SDK
- JetBrains Rider 2024.3+ - Full support with .NET 10 SDK
- VS Code - With C# Dev Kit extension
.NET CLI Commands
CI/CD Pipeline Dependencies
GitHub Actions
CI — Test & Coverage (.github/workflows/ci-test.yml):
- Runs on:
ubuntu-latest - .NET SDK:
10.0.x - Triggers: All pushes + PRs to main
- Enforces 40% line coverage
- Excludes integration tests:
--filter "Category!=Integration"
.github/workflows/ci-integration.yml):
- Runs on:
ubuntu-latest - Requires secrets:
AZURE_TENANT_ID,AZURE_CLIENT_ID,AZURE_CLIENT_SECRET - Runs against live tenant
- Uses
[Trait("Category", "Integration")]tests only
.github/workflows/build-release.yml):
- Builds self-contained Windows x64 executable
- Triggers: All pushes + PRs
- Outputs artifact for download
Required Secrets
For CI integration tests:AZURE_TENANT_ID- Test tenant IDAZURE_CLIENT_ID- App registration client IDAZURE_CLIENT_SECRET- App registration client secretSYNCFUSION_LICENSE_KEY- Syncfusion license key (for release builds)
Embedded Resources
From Core project:- PolicyTemplate.pptx - Base template for Conditional Access exports
- PolicyTemplateImage.pptx - Template with image support
- MicrosoftApps.json - Known Microsoft application IDs for CA policy display
Dependency Management
Package Versioning
- Package versions are pinned directly in each
.csprojfile - No central package management (no
Directory.Packages.props) - Versions are reviewed monthly
- Graph SDK updates require testing before merging
Update Strategy
- Review updates monthly
- Test Graph SDK updates in integration tests first
- Update one dependency at a time
- Run full test suite after each update
- Check for breaking changes in release notes
Critical Dependencies
Do not update without careful testing:Microsoft.Graph.Beta- Breaking changes common in preview versionsAvalonia- UI framework updates may affect theming/layoutMicrosoft.AspNetCore.DataProtection- Encryption compatibility concerns
Platform Requirements
Windows
- Minimum: Windows 10 1809+ (build 17763)
- Recommended: Windows 11
- .NET Runtime: Bundled (self-contained deployment)
- Memory: 512MB minimum, 1GB recommended
Linux (via Avalonia)
- Supported: Ubuntu 20.04+, Debian 11+, Fedora 35+
- Desktop: X11 or Wayland
- Dependencies:
libx11,libice,libsm
macOS (via Avalonia)
- Minimum: macOS 10.15 (Catalina)
- Architecture: x64 and ARM64 (Apple Silicon)
Version Information
Current version: 0.4.0 From.csproj files:
Versioning Scheme
Semantic Versioning (SemVer):Major.Minor.Patch
Pre-release tags:
alpha- Early developmentbeta- Feature complete, testingrc- Release candidate- (none) - Production release
Related Documentation
- Architecture Overview - Core architecture decisions
- Services - Service patterns and DI setup
- Testing - Testing frameworks and patterns
- Building - Build commands and workflows