AzureFunctions.Worker.Extensions.DurableTask 2.0.18

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

Type safe DurableTasks

  • Call orchestrations and activities with expressions to improve type safety
  • Avoid hardcoding function names with strings
  • Less boilerplate with useful extensions

NuGet package

https://www.nuget.org/packages/AzureFunctions.Worker.Extensions.DurableTask

Example

Usage

public class DurableTasks
{
    [Function(nameof(DurableTasks) + "_" + nameof(Orchestration))]
    public async Task Orchestration(
        [OrchestrationTrigger] TaskOrchestrationContext context,
        Data data)
    {
        // compile-time type safety check on function input and output parameter
        var result = await context.CallActivityAsync(() => this.SingleParamActivity(data));

        // workaround to pass activity context as default parameter in parameterless activity
        await context.CallActivityAsync(() => this.EmptyActivity(ActivityContext.Default));

        // workaround to pass multiple parameters into activity
        await context.CallActivityAsync(() => this.MultipleParamsActivity(ValueTuple.Create(data, Guid.NewGuid())));
    }

    [Function(nameof(DurableTasks) + "_" + nameof(SingleParamActivity))]
    public Task<Result> SingleParamActivity([ActivityTrigger] Device device)
    {
        return Task.FromResult(new Result());
    }

    [Function(nameof(DurableTasks) + "_" + nameof(EmptyActivity))]
    public Task EmptyActivity([ActivityTrigger] TaskActivityContext context)
    {
        return Task.CompletedTask;
    }

    [Function(nameof(DurableTasks) + "_" + nameof(MultipleParamsActivity))]
    public Task MultipleParamsActivity([ActivityTrigger] (Data Data, Guid Id) context)
    {
        return Task.CompletedTask;
    }
}
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 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
2.0.18 149 7/7/2025
2.0.17 100 6/27/2025
2.0.16 135 6/25/2025
2.0.15 126 6/25/2025
2.0.14 130 6/24/2025
2.0.13 138 6/18/2025

- Migration to .NET 9 and Azure Functions Worker v2