Skip to main content
Intune Commander is built on .NET 10 with Avalonia UI. This document lists all major dependencies, their versions, and their purpose in the application.

Runtime & Language

TechnologyVersionPurpose
.NET10.0 (LTS)Runtime platform (LTS through November 2026)
C#12Primary language with modern features
Target Frameworknet10.0All 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

From src/Intune.Commander.Core/Intune.Commander.Core.csproj:

Authentication & Graph API

<PackageReference Include="Azure.Identity" Version="1.17.1" />
<PackageReference Include="Microsoft.Graph.Beta" Version="5.130.0-preview" />
Azure.Identity (1.17.1)
  • Modern Microsoft-recommended authentication library
  • Provides TokenCredential abstraction
  • Supports multiple credential types:
    • InteractiveBrowserCredential - Browser-based interactive auth
    • ClientSecretCredential - Service principal authentication
  • Multi-cloud support via AuthorityHost configuration
  • Replaces direct MSAL usage
Microsoft.Graph.Beta (5.130.0-preview)
  • Important: Uses the Beta SDK, not the stable Microsoft.Graph package
  • All Graph models come from Microsoft.Graph.Beta.Models
  • GraphServiceClient from Microsoft.Graph.Beta
  • Provides access to latest Intune management APIs
  • Required for many Intune configuration types not in stable API

Data & Storage

<PackageReference Include="LiteDB" Version="5.0.21" />
<PackageReference Include="Microsoft.AspNetCore.DataProtection" Version="8.0.12" />
LiteDB (5.0.21)
  • 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
Microsoft.AspNetCore.DataProtection (8.0.12)
  • 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

<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="10.0.3" />
Microsoft.Extensions.DependencyInjection (10.0.3)
  • Standard .NET dependency injection container
  • Used to register services at startup
  • Configured in ServiceCollectionExtensions.AddIntuneCommanderCore()
Service Lifetimes:
  • Singleton: IAuthenticationProvider, IntuneGraphClientFactory, ProfileService, IProfileEncryptionService, ICacheService
  • Transient: IExportService, MainWindowViewModel
  • Not in DI: Graph API services (created post-authentication in MainWindowViewModel)
See Services documentation for detailed service patterns.

Office Document Generation

<PackageReference Include="Syncfusion.Presentation.Net.Core" Version="32.2.5" />
Syncfusion.Presentation.Net.Core (32.2.5)
  • 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

From src/Intune.Commander.Desktop/Intune.Commander.Desktop.csproj:

Avalonia Framework

<PackageReference Include="Avalonia" Version="11.3.12" />
<PackageReference Include="Avalonia.Desktop" Version="11.3.12" />
<PackageReference Include="Avalonia.Controls.DataGrid" Version="11.3.12" />
<PackageReference Include="Avalonia.Diagnostics" Version="11.3.12" />
Avalonia (11.3.12)
  • Cross-platform UI framework
  • XAML-based (.axaml files)
  • Supports Windows, macOS, Linux
  • Modern, performant alternative to WPF
  • Compile-time bindings enabled: AvaloniaUseCompiledBindingsByDefault=true
Avalonia.Desktop
  • Desktop-specific platform implementations
  • Window management, file dialogs, clipboard support
Avalonia.Controls.DataGrid
  • DataGrid control for displaying tables of data
  • Used extensively in main views for listing policies, profiles, etc.
Avalonia.Diagnostics
  • Development-time debugging tools
  • Only included in Debug builds
  • Removed from Release builds via conditional IncludeAssets

MVVM Framework

<PackageReference Include="CommunityToolkit.Mvvm" Version="8.2.1" />
CommunityToolkit.Mvvm (8.2.1)
  • Source generator-based MVVM framework
  • Generates boilerplate code at compile time
  • Key attributes:
    • [ObservableProperty] - Generates property with INotifyPropertyChanged
    • [RelayCommand] - Generates ICommand implementation
  • ViewModels must be partial class for source generators
Example:
public partial class LoginViewModel : ObservableObject
{
    [ObservableProperty]
    private string _tenantId = string.Empty;
    
    [RelayCommand]
    private async Task ConnectAsync()
    {
        // Implementation
    }
}

Charts & Visualization

<PackageReference Include="LiveChartsCore.SkiaSharpView.Avalonia" Version="2.0.0-rc6.1" />
LiveChartsCore.SkiaSharpView.Avalonia (2.0.0-rc6.1)
  • Modern charting library for Avalonia
  • Uses SkiaSharp for rendering
  • Used in Overview dashboard for visualization
  • Displays policy counts, compliance stats, etc.

UI Components & Styling

<PackageReference Include="Material.Icons.Avalonia" Version="3.0.0" />
<PackageReference Include="SukiUI" Version="6.0.3" />
Material.Icons.Avalonia (3.0.0)
  • Material Design icon library
  • Provides vector icons for UI
SukiUI (6.0.3)
  • Modern UI theme and control library for Avalonia
  • Provides styled controls and theme support
  • Used for consistent, modern UI appearance

Office Document Generation (Desktop)

<PackageReference Include="Syncfusion.Presentation.Net.Core" Version="32.2.5" />
Also referenced in Desktop project for PowerPoint export functionality.

Testing Dependencies

From tests/Intune.Commander.Core.Tests/Intune.Commander.Core.Tests.csproj:

Test Framework

<PackageReference Include="xunit" Version="2.5.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.3" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
xUnit (2.5.3)
  • Primary test framework
  • Uses [Fact] for simple tests
  • Uses [Theory] for parameterized tests
  • Integration test tagging: [Trait("Category", "Integration")]
Test Conventions:
[Fact]
public async Task MethodName_Scenario_ExpectedBehavior()
{
    // Arrange
    var service = new SomeService(mockClient);

    // Act
    var result = await service.SomeMethodAsync();

    // Assert
    Assert.NotNull(result);
}

Mocking

<PackageReference Include="NSubstitute" Version="5.3.0" />
NSubstitute (5.3.0)
  • Mocking library for unit tests
  • Clean, simple syntax
  • Used for mocking interfaces
Important: 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:
// Return values
svc.MethodAsync(Arg.Any<T>(), Arg.Any<CancellationToken>())
   .Returns(Task.FromResult(result));

// Argument capture
svc.MethodAsync(Arg.Do<T>(x => captured = x), Arg.Any<CancellationToken>())
   .Returns(...);

// Call verification
await svc.Received(1).MethodAsync(expectedArg, Arg.Any<CancellationToken>());

Code Coverage

<PackageReference Include="coverlet.collector" Version="8.0.0" />
<PackageReference Include="coverlet.msbuild" Version="8.0.0" />
Coverlet (8.0.0)
  • Code coverage tool for .NET
  • Integrated with CI pipeline
  • Enforces 40% line coverage threshold
  • Outputs Cobertura format
Coverage Command:
dotnet test /p:CollectCoverage=true /p:Threshold=40 /p:ThresholdType=line /p:ThresholdStat=total
See Testing documentation for coverage requirements.

Supporting Dependencies

<PackageReference Include="Microsoft.AspNetCore.DataProtection" Version="8.0.12" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="10.0.3" />
These are also referenced in the test project to test encryption and DI scenarios.

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

# Build
dotnet build Intune.Commander.sln

# Test (unit tests only)
dotnet test --filter "Category!=Integration"

# Test with coverage
dotnet test /p:CollectCoverage=true /p:Threshold=40

# Run desktop app
dotnet run --project src/Intune.Commander.Desktop

# Publish self-contained Windows executable
dotnet publish src/Intune.Commander.Desktop -c Release -r win-x64 --self-contained
See Building documentation for complete build instructions.

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"
CI — Integration Tests (.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
Build Release (.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 ID
  • AZURE_CLIENT_ID - App registration client ID
  • AZURE_CLIENT_SECRET - App registration client secret
  • SYNCFUSION_LICENSE_KEY - Syncfusion license key (for release builds)

Embedded Resources

From Core project:
<EmbeddedResource Include="Assets\PolicyTemplate.pptx" />
<EmbeddedResource Include="Assets\PolicyTemplateImage.pptx" />
<EmbeddedResource Include="Assets\MicrosoftApps.json" />
  • 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 .csproj file
  • No central package management (no Directory.Packages.props)
  • Versions are reviewed monthly
  • Graph SDK updates require testing before merging

Update Strategy

  1. Review updates monthly
  2. Test Graph SDK updates in integration tests first
  3. Update one dependency at a time
  4. Run full test suite after each update
  5. Check for breaking changes in release notes

Critical Dependencies

Do not update without careful testing:
  • Microsoft.Graph.Beta - Breaking changes common in preview versions
  • Avalonia - UI framework updates may affect theming/layout
  • Microsoft.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)
Note: Initial release targets Windows only. Linux and macOS support is enabled by Avalonia but not actively tested.

Version Information

Current version: 0.4.0 From .csproj files:
<Version>0.4.0</Version>
<AssemblyVersion>0.4.0.0</AssemblyVersion>
<FileVersion>0.4.0.0</FileVersion>

Versioning Scheme

Semantic Versioning (SemVer): Major.Minor.Patch Pre-release tags:
  • alpha - Early development
  • beta - Feature complete, testing
  • rc - Release candidate
  • (none) - Production release

Build docs developers (and LLMs) love