Azure / Azure/azure-functions-dotnet-worker

Azure Functions (isolated .NET 8 on Flex Consumption Plan) not triggered by Storage Queue Messages

Open
#3,099 0 comments 1 reaction 0 assignees View on GitHub
Needs: Triage (Functions)
Dominant language
C#
Stars
466
Forks
215
Avg merge
3d 10h
Merged PRs (30d)
7

Description

## Description

Azure Functions using the .NET 8 isolated worker model not triggering when a new message is added to the associated Azure Storage Queue. No errors are thrown during build or deployment, but the function fails to respond to new queue messages as expected.

## Suspected Root Cause
In a clean .NET 8 Azure Functions project using the **isolated worker model**, the generated `extensions.json` file includes references to **in-process WebJobs extensions** (`Microsoft.Azure.WebJobs.Extensions.Storage.Queues`) instead of the expected isolated worker extension (`Microsoft.Azure.Functions.Worker.Extensions.Storage.Queues`).

This happens despite:

- No `Microsoft.Azure.WebJobs.*` packages present
- Proper MSBuild properties:
- `GenerateFunctionsMetadata=true`
- `UseNETSdkIsolated=true`
- Usage of `Microsoft.Azure.Functions.Worker.Sdk` v2.0.5 with `OutputItemType="Analyzer"`
- Reproducibility in multiple clean local environments, Azure DevOps build pipeline, *and* Docker containers

---

## To Reproduce

1. Create a new project:

```bash
dotnet new console -n TestFunc
cd TestFunc
```

2. Contents of `TestFunc.csproj`:

```xml


net8.0
v4
Exe
enable
enable
RickettsCorp.ExchangeBackupService









```

3. Add a queue trigger:

```csharp
using Microsoft.Azure.Functions.Worker;
using Microsoft.Extensions.Logging;

public class QueueTriggerFunc
{
[Function("QueueTriggerFunc")]
public void Run([QueueTrigger("my-queue")] string message, FunctionContext context)
{
var logger = context.GetLogger("QueueTriggerFunc");
logger.LogInformation($"Message: {message}");
}
}
```

4. Build the project:

```bash
dotnet clean
dotnet build
```

5. Inspect `bin/Debug/net8.0/extensions.json`

---

## Expected behavior (I think)

The `extensions.json` file should contain:

```json
{
"extensions": [
{
"name": "StorageQueues",
"typeName": "Microsoft.Azure.Functions.Worker.Extensions.Storage.Queues.Startup, Microsoft.Azure.Functions.Worker.Extensions.Storage.Queues, Version=5.5.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
}
]
}
```

## Environment

| Component | Version |
|------------------------------------------------------------|------------------------|
| .NET SDK | 8.0.x |
| Microsoft.Azure.Functions.Worker | 2.0.0 |
| Microsoft.Azure.Functions.Worker.Sdk | 2.0.5 |
| Microsoft.Azure.Functions.Worker.Extensions.Storage.Queues | 5.5.2 |
| OS | Windows 11 + Docker |
| Azure Functions Core Tools | v4.x |

## Additional context

- Functions are successfully registered In the Fu
- No `Microsoft.Azure.WebJobs.*` packages are referenced directly or transitively
- No `Directory.Build.props` or global MSBuild configuration influencing the build
- Issue is reproducible across multiple clean environments, including containers:
- Verified with `mcr.microsoft.com/dotnet/sdk:8.0`
- Host.json contains no `extensionBundle` configuration
- Replicated on multiple Azure tenants and regions

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the provided TestFunc.csproj and the generated bin/Debug/net8.0/extensions.json after running dotnet clean and dotnet build. Compare the generated extension entry with the referenced Microsoft.Azure.Functions.Worker.Extensions.Storage.Queues package and verify the queue trigger responds to a new message; done means the isolated StorageQueues type is emitted and the trigger runs.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, csharp
Domain
backend, cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.