Skip to content

.NET Workflows - Remove Support for Code-Gen#4887

Closed
crickman wants to merge 5 commits into
mainfrom
crickman/workflows-declarative-nocodegen
Closed

.NET Workflows - Remove Support for Code-Gen#4887
crickman wants to merge 5 commits into
mainfrom
crickman/workflows-declarative-nocodegen

Conversation

@crickman
Copy link
Copy Markdown
Contributor

Motivation and Context

Removing support for code-gen.

Description

Code-gen was never great and sufferered from interference around decision point on best solution.

Contribution Checklist

  • The code builds clean without any errors or warnings
  • The PR follows the Contribution Guidelines
  • All unit tests pass, and I have added new tests where possible
  • Is this a breaking change? If yes, add "[BREAKING]" prefix to the title of the PR.

@crickman crickman self-assigned this Mar 24, 2026
@crickman crickman added .NET workflows Related to Workflows in agent-framework labels Mar 24, 2026
Copilot AI review requested due to automatic review settings March 24, 2026 20:51
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes the .NET declarative workflow code-generation (“Eject” + T4 templates) surface area from Microsoft.Agents.AI.Workflows.Declarative, along with associated unit/integration tests that validated generated output.

Changes:

  • Removed DeclarativeWorkflowBuilder.Eject(...) and the code-gen interpreter/build pipeline used to produce provider/executor scaffolding.
  • Deleted the CodeGen/ T4 templates, generated .cs files, and code-gen unit tests; excluded the remaining code-gen integration test file from compilation.
  • Replaced a hard [Theory(Skip=...)] with a Trait("Category","IntegrationDisabled") to align with CI filtering.

Reviewed changes

Copilot reviewed 108 out of 108 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/CodeGen/WorkflowActionTemplateTest.cs Removed code-gen unit test base class.
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/CodeGen/SetVariableTemplateTest.cs Removed code-gen unit test.
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/CodeGen/SetTextVariableTemplateTest.cs Removed code-gen unit test.
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/CodeGen/SetMultipleVariablesTemplateTest.cs Removed code-gen unit test.
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/CodeGen/RetrieveConversationMessagesTemplateTest.cs Removed code-gen unit test.
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/CodeGen/RetrieveConversationMessageTemplateTest.cs Removed code-gen unit test.
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/CodeGen/ResetVariableTemplateTest.cs Removed code-gen unit test.
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/CodeGen/ProviderTemplateTest.cs Removed code-gen provider template unit test.
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/CodeGen/InvokeAzureAgentTemplateTest.cs Removed code-gen unit test.
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/CodeGen/GotoTemplateTest.cs Removed code-gen unit test.
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/CodeGen/ForeachTemplateTest.cs Removed code-gen unit test.
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/CodeGen/EndDialogTest.cs Removed code-gen unit test.
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/CodeGen/EndConversationTest.cs Removed code-gen unit test.
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/CodeGen/EdgeTemplateTest.cs Removed code-gen unit test.
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/CodeGen/DeclarativeEjectionTest.cs Removed baseline/compile validation test for ejected code.
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/CodeGen/CreateConversationTemplateTest.cs Removed code-gen unit test.
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/CodeGen/CopyConversationMessagesTemplateTest.cs Removed code-gen unit test.
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/CodeGen/ContinueLoopTemplateTest.cs Removed code-gen unit test.
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/CodeGen/ConditionGroupTemplateTest.cs Removed code-gen unit test.
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/CodeGen/ClearAllVariablesTemplateTest.cs Removed code-gen unit test.
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/CodeGen/BreakLoopTemplateTest.cs Removed code-gen unit test.
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/CodeGen/AddConversationMessageTemplateTest.cs Removed code-gen unit test.
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests.csproj Excluded DeclarativeCodeGenTest.cs from compilation.
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/DeclarativeWorkflowTest.cs Switched from Skip to Trait("Category","IntegrationDisabled") for multi-turn tests.
dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/Microsoft.Agents.AI.Workflows.Declarative.csproj Removed T4 preprocessing item group for templates.
dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/Interpreter/WorkflowTemplateVisitor.cs Removed code-gen visitor that built a modeled code graph.
dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/Interpreter/WorkflowCodeBuilder.cs Removed code-gen builder that emitted provider/executor source.
dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/DeclarativeWorkflowBuilder.cs Removed Eject(...) public API (code generation entrypoint).
dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/CodeGen/Snippets/FormatMessageTemplate.tt Removed code-gen snippet template.
dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/CodeGen/Snippets/EvaluateValueExpressionTemplate.tt Removed code-gen snippet template.
dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/CodeGen/Snippets/EvaluateStringExpressionTemplate.tt Removed code-gen snippet template.
dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/CodeGen/Snippets/EvaluateRecordExpressionTemplate.tt Removed code-gen snippet template.
dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/CodeGen/Snippets/EvaluateListExpressionTemplate.tt Removed code-gen snippet template.
dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/CodeGen/Snippets/EvaluateIntExpressionTemplate.tt Removed code-gen snippet template.
dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/CodeGen/Snippets/EvaluateEnumExpressionTemplate.tt Removed code-gen snippet template.
dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/CodeGen/Snippets/EvaluateBoolExpressionTemplate.tt Removed code-gen snippet template.
dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/CodeGen/Snippets/AssignVariableTemplate.tt Removed code-gen snippet template.
dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/CodeGen/SetVariableTemplateCode.cs Removed code-gen template support code.
dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/CodeGen/SetVariableTemplate.tt Removed T4 template.
dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/CodeGen/SetVariableTemplate.cs Removed generated template output.
dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/CodeGen/SetTextVariableTemplateCode.cs Removed code-gen template support code.
dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/CodeGen/SetTextVariableTemplate.tt Removed T4 template.
dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/CodeGen/SetTextVariableTemplate.cs Removed generated template output.
dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/CodeGen/SetMultipleVariablesTemplateCode.cs Removed code-gen template support code.
dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/CodeGen/SetMultipleVariablesTemplate.tt Removed T4 template.
dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/CodeGen/SetMultipleVariablesTemplate.cs Removed generated template output.
dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/CodeGen/SendActivityTemplateCode.cs Removed code-gen template support code.
dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/CodeGen/SendActivityTemplate.tt Removed T4 template.
dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/CodeGen/SendActivityTemplate.cs Removed generated template output.
dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/CodeGen/RootTemplateCode.cs Removed code-gen template support code.
dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/CodeGen/RootTemplate.tt Removed T4 template.
dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/CodeGen/RootTemplate.cs Removed generated template output.
dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/CodeGen/RetrieveConversationMessagesTemplateCode.cs Removed code-gen template support code.
dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/CodeGen/RetrieveConversationMessagesTemplate.tt Removed T4 template.
dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/CodeGen/RetrieveConversationMessagesTemplate.cs Removed generated template output.
dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/CodeGen/RetrieveConversationMessageTemplateCode.cs Removed code-gen template support code.
dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/CodeGen/RetrieveConversationMessageTemplate.tt Removed T4 template.
dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/CodeGen/RetrieveConversationMessageTemplate.cs Removed generated template output.
dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/CodeGen/ResetVariableTemplateCode.cs Removed code-gen template support code.
dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/CodeGen/ResetVariableTemplate.tt Removed T4 template.
dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/CodeGen/ResetVariableTemplate.cs Removed generated template output.
dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/CodeGen/QuestionTemplateCode.cs Removed code-gen template support code.
dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/CodeGen/QuestionTemplate.tt Removed T4 template.
dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/CodeGen/QuestionTemplate.cs Removed generated template output.
dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/CodeGen/ProviderTemplateCode.cs Removed code-gen template support code.
dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/CodeGen/ProviderTemplate.tt Removed T4 template.
dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/CodeGen/ProviderTemplate.cs Removed generated template output.
dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/CodeGen/ParseValueTemplateCode.cs Removed code-gen template support code.
dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/CodeGen/ParseValueTemplate.tt Removed T4 template.
dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/CodeGen/ParseValueTemplate.cs Removed generated template output.
dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/CodeGen/InvokeAzureAgentTemplateCode.cs Removed code-gen template support code.
dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/CodeGen/InvokeAzureAgentTemplate.tt Removed T4 template.
dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/CodeGen/InvokeAzureAgentTemplate.cs Removed generated template output.
dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/CodeGen/InstanceTemplateCode.cs Removed code-gen template support code.
dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/CodeGen/InstanceTemplate.tt Removed T4 template.
dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/CodeGen/InstanceTemplate.cs Removed generated template output.
dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/CodeGen/ForeachTemplateCode.cs Removed code-gen template support code.
dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/CodeGen/ForeachTemplate.tt Removed T4 template.
dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/CodeGen/ForeachTemplate.cs Removed generated template output.
dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/CodeGen/EmptyTemplateCode.cs Removed code-gen template support code.
dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/CodeGen/EmptyTemplate.tt Removed T4 template.
dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/CodeGen/EmptyTemplate.cs Removed generated template output.
dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/CodeGen/EditTableV2TemplateCode.cs Removed code-gen template support code.
dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/CodeGen/EditTableV2Template.tt Removed T4 template.
dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/CodeGen/EditTableV2Template.cs Removed generated template output.
dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/CodeGen/EdgeTemplateCode.cs Removed code-gen template support code.
dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/CodeGen/EdgeTemplate.tt Removed T4 template.
dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/CodeGen/EdgeTemplate.cs Removed generated template output.
dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/CodeGen/DefaultTemplateCode.cs Removed code-gen template support code.
dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/CodeGen/DefaultTemplate.tt Removed T4 template.
dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/CodeGen/DefaultTemplate.cs Removed generated template output.
dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/CodeGen/CreateConversationTemplateCode.cs Removed code-gen template support code.
dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/CodeGen/CreateConversationTemplate.tt Removed T4 template.
dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/CodeGen/CreateConversationTemplate.cs Removed generated template output.
dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/CodeGen/CopyConversationMessagesTemplateCode.cs Removed code-gen template support code.
dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/CodeGen/CopyConversationMessagesTemplate.tt Removed T4 template.
dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/CodeGen/CopyConversationMessagesTemplate.cs Removed generated template output.
dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/CodeGen/ConditionGroupTemplateCode.cs Removed code-gen template support code.
dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/CodeGen/ConditionGroupTemplate.tt Removed T4 template.
dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/CodeGen/ConditionGroupTemplate.cs Removed generated template output.
dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/CodeGen/CodeTemplate.cs Removed code-gen base template engine implementation.
dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/CodeGen/ClearAllVariablesTemplateCode.cs Removed code-gen template support code.
dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/CodeGen/ClearAllVariablesTemplate.tt Removed T4 template.
dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/CodeGen/ClearAllVariablesTemplate.cs Removed generated template output.
dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/CodeGen/AddConversationMessageTemplateCode.cs Removed code-gen template support code.
dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/CodeGen/AddConversationMessageTemplate.tt Removed T4 template.
dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/CodeGen/AddConversationMessageTemplate.cs Removed generated template output.
dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/CodeGen/ActionTemplate.cs Removed code-gen action template base class.

@peibekwe
Copy link
Copy Markdown
Contributor

This is addressed by #6095

@peibekwe peibekwe closed this May 27, 2026
@github-project-automation github-project-automation Bot moved this from In Review to Done in Agent Framework May 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

declarative-workflow .NET workflows Related to Workflows in agent-framework

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants