We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6897cce commit a356142Copy full SHA for a356142
src/Generators/DurableTaskSourceGenerator.cs
@@ -358,11 +358,15 @@ public static class GeneratedDurableTaskExtensions
358
else
359
{
360
// ASP.NET Core-specific service registration methods
361
- AddRegistrationMethodForAllTasks(
362
- sourceBuilder,
363
- orchestrators,
364
- activities,
365
- entities);
+ // Only generate if there are actually tasks to register
+ if (orchestrators.Count > 0 || activities.Count > 0 || entities.Count > 0)
+ {
+ AddRegistrationMethodForAllTasks(
+ sourceBuilder,
366
+ orchestrators,
367
+ activities,
368
+ entities);
369
+ }
370
}
371
372
sourceBuilder.AppendLine(" }").AppendLine("}");
0 commit comments