Microsoft.Azure.Functions.Worker.Sdk 2.1.0

Microsoft.Azure.Functions.Worker.Sdk

This package provides development-time support for Azure Functions .NET isolated worker apps, including MSBuild build and publish targets, a Roslyn source generator for function metadata, and analyzers.

Getting Started

This package is typically added via the Azure Functions project template. To add it manually:

dotnet add package Microsoft.Azure.Functions.Worker.Sdk

For more information, see the Azure Functions .NET isolated worker guide.

What's Included

Build & Publish Targets

The SDK adds MSBuild targets that run during build and publish:

  • Function indexing — Analyzes your compiled assembly and generates function metadata (functions.metadata) so the Azure Functions host can discover your functions without runtime reflection.
  • Extension bundling — Auto-generates a WorkerExtensions project that compiles all binding extension packages into a single assembly.
  • Publish support — Configures output for deployment, including Docker base image assignment for container scenarios.

Source Generators

Three Roslyn source generators run at compile time:

  • FunctionMetadataProvider — Generates a IFunctionMetadataProvider implementation that returns metadata for all [Function]-attributed methods. This enables build-time indexing for fast cold starts.
  • FunctionExecutor — Generates strongly-typed wrapper methods for invoking user functions with correct parameter binding.
  • ExtensionStartupRunner — Generates a startup orchestrator that calls Configure() on all extension startup types.

Analyzers

This package includes analyzers (AZFW0001–AZFW0013, AZFW0017) that catch common issues during development. For the full list of rules and detailed documentation, see the analyzer rules reference.

Configuration

The SDK exposes MSBuild properties you can set in your .csproj to control its behavior:

<PropertyGroup>
  <!-- Azure Functions runtime version (default: v4) -->
  <AzureFunctionsVersion>v4</AzureFunctionsVersion>

  <!-- Disable build-time function indexing (default: true) -->
  <FunctionsEnableWorkerIndexing>true</FunctionsEnableWorkerIndexing>

  <!-- Control metadata source generation independently (default: mirrors FunctionsEnableWorkerIndexing) -->
  <FunctionsEnableMetadataSourceGen>true</FunctionsEnableMetadataSourceGen>

  <!-- Control executor source generation independently (default: true) -->
  <FunctionsEnableExecutorSourceGen>true</FunctionsEnableExecutorSourceGen>

  <!-- Namespace for generated code (default: your project's RootNamespace) -->
  <FunctionsGeneratedCodeNamespace>MyApp.Generated</FunctionsGeneratedCodeNamespace>
</PropertyGroup>

No packages depend on Microsoft.Azure.Functions.Worker.Sdk.

Version Downloads Last updated
2.1.0 3 07/30/2026
2.0.7 8 04/26/2026
2.0.6 7 04/26/2026
2.0.5 7 04/26/2026
2.0.4 7 04/26/2026
2.0.3 7 04/26/2026
2.0.2 7 04/26/2026
2.0.1 7 04/26/2026
2.0.0 7 04/26/2026
2.0.0-preview2 7 04/26/2026
2.0.0-preview1 6 04/26/2026
1.18.1 7 04/26/2026
1.18.0 7 04/26/2026
1.17.4 7 04/26/2026
1.17.3 7 04/26/2026
1.17.3-preview2 6 04/26/2026
1.17.3-preview1 6 04/26/2026
1.17.2 7 04/26/2026
1.17.1 6 04/26/2026
1.17.0 5 04/26/2026
1.17.0-preview3 6 04/26/2026
1.17.0-preview2 6 04/26/2026
1.17.0-preview1 6 04/26/2026
1.16.4 7 04/26/2026
1.16.4-preview1 6 04/26/2026
1.16.3 7 04/26/2026
1.16.2 5 04/26/2026
1.16.1 7 04/26/2026
1.16.0 5 04/26/2026
1.15.1 7 04/26/2026
1.15.0 7 04/26/2026
1.14.1 7 04/26/2026
1.14.0 7 04/26/2026
1.13.1 7 04/26/2026
1.13.0 7 04/26/2026
1.12.0 7 04/26/2026
1.11.0 7 04/26/2026
1.11.0-preview1 6 04/26/2026
1.10.0 7 04/26/2026
1.9.0 7 04/26/2026
1.9.0-preview2 6 04/26/2026
1.9.0-preview1 6 04/26/2026
1.8.0-preview2 6 04/26/2026
1.8.0-preview1 6 04/26/2026
1.7.0 7 04/26/2026
1.7.0-preview2 6 04/26/2026
1.7.0-preview1 6 04/26/2026
1.5.0-preview2 6 04/26/2026
1.5.0-preview1 6 04/26/2026
1.3.0 7 04/26/2026
1.2.0 7 04/26/2026
1.2.0-preview.2 6 04/26/2026
1.2.0-preview.1 6 04/26/2026
1.1.0-preview.1 7 04/26/2026
1.0.4 7 04/26/2026
1.0.3 7 04/26/2026
1.0.2 7 04/26/2026
1.0.1 7 04/26/2026
1.0.1-preview5 6 04/26/2026
1.0.0-preview5 6 04/26/2026
1.0.0-preview4 6 04/28/2026
1.0.0-preview3 6 04/28/2026
1.0.0-preview2 6 04/28/2026
1.0.0-preview1 7 04/28/2026