Jezda.Common.Integrations.AzureDevOps 1.0.37

dotnet add package Jezda.Common.Integrations.AzureDevOps --version 1.0.37
                    
NuGet\Install-Package Jezda.Common.Integrations.AzureDevOps -Version 1.0.37
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Jezda.Common.Integrations.AzureDevOps" Version="1.0.37" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Jezda.Common.Integrations.AzureDevOps" Version="1.0.37" />
                    
Directory.Packages.props
<PackageReference Include="Jezda.Common.Integrations.AzureDevOps" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Jezda.Common.Integrations.AzureDevOps --version 1.0.37
                    
#r "nuget: Jezda.Common.Integrations.AzureDevOps, 1.0.37"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Jezda.Common.Integrations.AzureDevOps@1.0.37
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Jezda.Common.Integrations.AzureDevOps&version=1.0.37
                    
Install as a Cake Addin
#tool nuget:?package=Jezda.Common.Integrations.AzureDevOps&version=1.0.37
                    
Install as a Cake Tool

Jezda.Common.Integrations.AzureDevOps

A strongly-typed .NET client for Azure DevOps REST API, built on top of Jezda.Common.Integrations. This library simplifies interaction with Azure DevOps by providing easy-to-use methods for Work Items, WIQL queries, and Time Tracking data.

✨ Features

  • Work Item Management: Create and retrieve work items.
  • WIQL Support: Execute raw WIQL queries and get typed results.
  • Time Tracking: Extract completed work logs from work item history (reconstructed from CompletedWork field changes).
  • Project Management: List all projects in the organization.
  • Dependency Injection: Ready-to-use IServiceCollection extension.

📦 Installation

Add the project reference or NuGet package:

dotnet add package Jezda.Common.Integrations.AzureDevOps

⚙️ Configuration

Add the following section to your appsettings.json:

{
  "Integrations": {
    "AzureDevOps": {
      "BaseUrl": "https://dev.azure.com/your-organization/",
      "PersonalAccessToken": "your-pat-token",
      "ApiVersion": "7.1"
    }
  }
}

🚀 Usage

1. Register Services

In your Program.cs:

using Jezda.Common.Integrations.Extensions;

builder.Services.AddAzureDevOpsIntegration(builder.Configuration);

2. Inject and Use

Inject IAzureDevOpsClient into your service:

public class MyService
{
    private readonly IAzureDevOpsClient _adoClient;

    public MyService(IAzureDevOpsClient adoClient)
    {
        _adoClient = adoClient;
    }

    public async Task SyncDataAsync()
    {
        // 1. Get all projects
        var projects = await _adoClient.GetProjectsAsync();

        // 2. Get work items via WIQL
        var workItems = await _adoClient.GetWorkItemsByQueryAsync(
            "SELECT [System.Id] FROM WorkItems WHERE [System.State] = 'Active'");

        // 3. Get time logs for January
        var logs = await _adoClient.GetCompletedWorkLogsAsync(
            new DateTimeOffset(2025, 1, 1, 0, 0, 0, TimeSpan.Zero),
            new DateTimeOffset(2025, 1, 31, 23, 59, 59, TimeSpan.Zero)
        );
        
        foreach(var log in logs)
        {
            Console.WriteLine($"User {log.UserDisplayName} logged {log.Hours}h on {log.Project}");
        }
    }
}

🛠️ Key Models

  • AdoWorkItem: Represents a simplified work item with generic Fields dictionary.
  • AdoProject: Contains project details (Id, Name, Description, Url).
  • AdoWorkLogEntry: Calculated work log entry (User, Hours, Date, Project).
Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.37 318 3/12/2026
1.0.36 82 3/8/2026
1.0.35 105 2/17/2026