-
Notifications
You must be signed in to change notification settings - Fork 280
Open
Labels
P1Priority 1Priority 1
Description
Description
When compiling a function app on the latest 1.6.0
or 1.6.1
builds Visual Studio produces numerous ArgumentException
exceptions from within the new analyzers if an orchestrator or activity calls an extension method defined in a separate project. These warnings are not produced when running dotnet build
directly.
Expected behavior
- Code compiles without warnings.
Actual behavior
- Analyzers throw exceptions during execution, resulting in "AD0001" warnings in Visual Studio after build.
Relevant source code snippets
public class Demo
{
[Function(nameof(DemoOrchestrato))]
public async Task DemoOrchestrato([OrchestrationTrigger] TaskOrchestrationContext context)
{
_ = context.DemoExtension();
await context.CallActivityAsync(nameof(DemoActivity));
}
[Function(nameof(DemoActivity))]
public async Task DemoActivity([ActivityTrigger] FunctionContext context)
{
context.GetLogger<Demo>().LogInformation("Hello from DemoActivity");
await Task.Delay(1);
}
[Function(nameof(DemoTrigger))]
public async Task<HttpResponseData> DemoTrigger(
[HttpTrigger(AuthorizationLevel.Function, "post")] HttpRequestData req,
[DurableClient] DurableTaskClient starter,
FunctionContext context
)
{
context.GetLogger<Demo>().LogInformation("C# HTTP trigger function processed a request.");
var instanceId = await starter.ScheduleNewOrchestrationInstanceAsync(nameof(DemoOrchestrato));
return starter.CreateCheckStatusResponse(req, instanceId);
}
}
Known workarounds
- Downgrading to
1.5.0
- Removing the extension method call (not an option in our case)
App Details
Microsoft.Azure.Functions.Worker.Extensions.DurableTask
:1.6.0+
- Azure Functions runtime:
2.0
- Language: C#
Screenshots

epDugas
Metadata
Metadata
Assignees
Labels
P1Priority 1Priority 1