Skip to content

Roslyn Analyzer to detect calls to non-existent functions fails, when Activity function defined in other assembly than orchestrator #580

@piotrczerwinski-insert

Description

@piotrczerwinski-insert

The Roslyn analyzer introduced in version 1.12.1 incorrectly reports warning DURABLE2003 when an activity function is defined in a separate assembly from the orchestrator, even though the function is correctly defined and works at runtime.

Package Version
• Working version: Microsoft.Azure.Functions.Worker.Extensions.DurableTask 1.12.0
• Affected version: Microsoft.Azure.Functions.Worker.Extensions.DurableTask 1.12.1

Expected Behavior

No warning should be raised when an activity function is correctly defined in a referenced assembly. The analyzer should be able to detect activity functions across assembly boundaries.

Actual Behavior

The analyzer emits the following warning:

DurableOrchestrator\Function1.cs(23,27,23,88): warning DURABLE2003: The activity function 'SayHello' was not found in the current compilation. Ensure the activity is defined and the name matches exactly.

Steps to Reproduce

  1. Create a new Azure Function project from the standard template with Orchestrator function
  2. Create a separate class library project (e.g., ActivityFunctions)
  3. Move the SayHello activity function to the separate assembly
  4. Add a project reference from the orchestrator project to the ActivityFunctions project
  5. Update Microsoft.Azure.Functions.Worker.Extensions.DurableTask to version 1.12.1

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions