Hamelin.Runtimes.AzurePipelines 1.0.1

dotnet add package Hamelin.Runtimes.AzurePipelines --version 1.0.1
                    
NuGet\Install-Package Hamelin.Runtimes.AzurePipelines -Version 1.0.1
                    
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="Hamelin.Runtimes.AzurePipelines" Version="1.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Hamelin.Runtimes.AzurePipelines" Version="1.0.1" />
                    
Directory.Packages.props
<PackageReference Include="Hamelin.Runtimes.AzurePipelines" />
                    
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 Hamelin.Runtimes.AzurePipelines --version 1.0.1
                    
#r "nuget: Hamelin.Runtimes.AzurePipelines, 1.0.1"
                    
#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 Hamelin.Runtimes.AzurePipelines@1.0.1
                    
#: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=Hamelin.Runtimes.AzurePipelines&version=1.0.1
                    
Install as a Cake Addin
#tool nuget:?package=Hamelin.Runtimes.AzurePipelines&version=1.0.1
                    
Install as a Cake Tool

Hamelin.Runtimes.AzurePipelines

Pull Request Release

This package adds integration for running Hamelin pipelines in an Azure Pipelines environment.

Installation

To install the package, you can use the following command:

dotnet add package Hamelin.Runtimes.AzurePipelines

Usage

Registration

To add Azure Pipelines runtime support to your Hamelin pipeline, you can use the AddAzurePipelinesRuntime extension method on the IServiceCollection.

Runtime integration will only be fully registered if the AzurePipelinesRuntimeOptions.RuntimeDetector detects that the application is running in an Azure Pipelines environment. See Runtime Detection for more details.

using Hamelin;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;

var builder = PipelineApplication.CreateBuilder(args);

builder.Services
    .AddAzurePipelinesRuntime();

// ...

var pipeline = builder.Build();

// ...

await pipeline.RunAsync();

Options

You can configure the Azure Pipelines runtime by providing options to the AddAzurePipelinesRuntime method. The options allow you to customize the behavior of the runtime, such as the runtime detector and logging settings.s

Runtime Detection

The runtime integration will only be fully registered if the RuntimeDetector delegate returns true. By default, this is done by checking for the presence of the TF_BUILD environment variable. If you need to customize this behavior, you can provide your own RuntimeDetector implementation.

If the runtime isn't detected, you will still be able to inject IAzurePipelinesCommands into your pipeline steps, but a stub implementation will be resolved instead.

If you need to check if the runtime is detected, you can inject the IAzurePipelinesContext interface, which provides an IsEnabled property.

Logging

The Azure Pipelines integration includes a logging formatter that adapts the logging output for Azure Pipelines. Warnings and errors are raised as issues on the pipeline.

Commands

With the Azure Pipelines integration registered, you can inject the IAzurePipelinesCommands interface into your pipeline steps to run commands in the Azure Pipelines environment, including manually writing logs, grouping log messages and setting outputs.


Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  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.1 241 9/11/2025
0.0.1 233 8/18/2025