Skip to content

.NET: [Question] [dotnet][workflows] [MessageHandler] partial Executor requires manual ConfigureProtocol (CS0534) #5830

@toledo85

Description

@toledo85

Hi team,

I’m using Microsoft.Agents.AI.Workflows 1.5.0 and following the docs pattern with [MessageHandler] on a partial class inheriting from Executor("...").

Build fails with:

CS0534: 'AddTenExecutor' does not implement inherited abstract member 'Executor.ConfigureProtocol(ProtocolBuilder)'

Minimal repro:

using Microsoft.Agents.AI.Workflows;

namespace AgentFrameworkLearning;

public sealed partial class AddTenExecutor() : Executor("SourceExecutor") {
    [MessageHandler]
    private ValueTask<int> HandleAsync(int input, IWorkflowContext context, CancellationToken ct) {
        return ValueTask.FromResult(input + 10);
    }
}

Environment:

  • Microsoft.Agents.AI.Workflows 1.5.0
  • Reproduced on net10.0 and net9.0
  • Command: dotnet build -nodeReuse:false /p:UseSharedCompilation=false

What I tested:

  • Clean build
  • No duplicate using
  • Separate file for executor class

Manual ConfigureProtocol + ConfigureRoutes(AddHandler) works as a workaround, so the workflow logic itself is valid.

Is additional setup required for [MessageHandler] source generation, or is this a known issue?
Could you share a minimal working example on 1.5.0 that uses [MessageHandler] without manual ConfigureProtocol?

Metadata

Metadata

Assignees

Labels

.NETquestionFurther information is requested

Type

No type

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions