diff --git a/dotnet/.github/skills/verify-samples-tool/SKILL.md b/dotnet/.github/skills/verify-samples-tool/SKILL.md
index 4d4f153bfd..39f05bce28 100644
--- a/dotnet/.github/skills/verify-samples-tool/SKILL.md
+++ b/dotnet/.github/skills/verify-samples-tool/SKILL.md
@@ -173,11 +173,11 @@ new SampleDefinition
```csharp
new SampleDefinition
{
- Name = "Workflow_Declarative_GenerateCode",
- ProjectPath = "samples/03-workflows/Declarative/GenerateCode",
+ Name = "Workflow_Visualization",
+ ProjectPath = "samples/03-workflows/Visualization",
IsDeterministic = true,
- MustContain = ["WORKFLOW: Parsing", "WORKFLOW: Defined"],
- ExpectedOutputDescription = ["The output should show a YAML workflow being parsed and C# code being generated from it."],
+ MustContain = ["Generating workflow visualization...", "Mermaid string:", "DiGraph string:"],
+ ExpectedOutputDescription = ["The output should show workflow visualization in Mermaid and DiGraph formats."],
},
```
diff --git a/dotnet/agent-framework-dotnet.slnx b/dotnet/agent-framework-dotnet.slnx
index ed787e4b53..2a7c360bee 100644
--- a/dotnet/agent-framework-dotnet.slnx
+++ b/dotnet/agent-framework-dotnet.slnx
@@ -241,7 +241,6 @@
-
diff --git a/dotnet/eng/MSBuild/Shared.props b/dotnet/eng/MSBuild/Shared.props
index 1a3feb4c4f..6cf0792729 100644
--- a/dotnet/eng/MSBuild/Shared.props
+++ b/dotnet/eng/MSBuild/Shared.props
@@ -11,9 +11,6 @@
-
-
-
diff --git a/dotnet/eng/verify-samples/WorkflowSamples.cs b/dotnet/eng/verify-samples/WorkflowSamples.cs
index 2793dd04c5..da46732e69 100644
--- a/dotnet/eng/verify-samples/WorkflowSamples.cs
+++ b/dotnet/eng/verify-samples/WorkflowSamples.cs
@@ -439,15 +439,6 @@ internal static class WorkflowSamples
ExpectedOutputDescription = ["The output should show a workflow calling function tools (e.g. a menu plugin) to answer a question about restaurant specials."],
},
- new SampleDefinition
- {
- Name = "Workflow_Declarative_GenerateCode",
- ProjectPath = "samples/03-workflows/Declarative/GenerateCode",
- IsDeterministic = true,
- MustContain = ["WORKFLOW: Parsing", "WORKFLOW: Defined"],
- ExpectedOutputDescription = ["The output should show a YAML workflow being parsed and C# code being generated from it."],
- },
-
new SampleDefinition
{
Name = "Workflow_Declarative_HostedWorkflow",
diff --git a/dotnet/samples/03-workflows/Declarative/GenerateCode/GenerateCode.csproj b/dotnet/samples/03-workflows/Declarative/GenerateCode/GenerateCode.csproj
deleted file mode 100644
index a85173d289..0000000000
--- a/dotnet/samples/03-workflows/Declarative/GenerateCode/GenerateCode.csproj
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
-
- Exe
- net10.0
- enable
- enable
- 5ee045b0-aea3-4f08-8d31-32d1a6f8fed0
- $(NoWarn);CA1812
-
-
-
- true
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/dotnet/samples/03-workflows/Declarative/GenerateCode/Program.cs b/dotnet/samples/03-workflows/Declarative/GenerateCode/Program.cs
deleted file mode 100644
index c9bbc3502e..0000000000
--- a/dotnet/samples/03-workflows/Declarative/GenerateCode/Program.cs
+++ /dev/null
@@ -1,105 +0,0 @@
-// Copyright (c) Microsoft. All rights reserved.
-
-using System.Diagnostics;
-using Microsoft.Agents.AI.Workflows.Declarative;
-
-namespace Demo.DeclarativeEject;
-
-///
-/// HOW TO: Convert a workflow from a declartive (yaml based) definition to code.
-///
-///
-/// Usage
-/// Provide the path to the workflow definition file as the first argument.
-/// All other arguments are intepreted as a queue of inputs.
-/// When no input is queued, interactive input is requested from the console.
-///
-internal sealed class Program
-{
- public static void Main(string[] args)
- {
- Program program = new(args);
- program.Execute();
- }
-
- private void Execute()
- {
- // Read and parse the declarative workflow.
- Notify($"WORKFLOW: Parsing {Path.GetFullPath(this.WorkflowFile)}");
-
- Stopwatch timer = Stopwatch.StartNew();
-
- // Use DeclarativeWorkflowBuilder to generate code based on a YAML file.
- string code =
- DeclarativeWorkflowBuilder.Eject(
- this.WorkflowFile,
- DeclarativeWorkflowLanguage.CSharp,
- workflowNamespace: "Demo.DeclarativeCode",
- workflowPrefix: "Sample");
-
- Notify($"\nWORKFLOW: Defined {timer.Elapsed}\n");
-
- Console.WriteLine(code);
- }
-
- private const string DefaultWorkflow = "Marketing.yaml";
-
- private string WorkflowFile { get; }
-
- private Program(string[] args)
- {
- this.WorkflowFile = ParseWorkflowFile(args);
- }
-
- private static string ParseWorkflowFile(string[] args)
- {
- string workflowFile = args.FirstOrDefault() ?? DefaultWorkflow;
-
- if (!File.Exists(workflowFile) && !Path.IsPathFullyQualified(workflowFile))
- {
- string? repoFolder = GetRepoFolder();
- if (repoFolder is not null)
- {
- workflowFile = Path.Combine(repoFolder, "declarative-agents", "workflow-samples", workflowFile);
- workflowFile = Path.ChangeExtension(workflowFile, ".yaml");
- }
- }
-
- if (!File.Exists(workflowFile))
- {
- throw new InvalidOperationException($"Unable to locate workflow: {Path.GetFullPath(workflowFile)}.");
- }
-
- return workflowFile;
-
- static string? GetRepoFolder()
- {
- DirectoryInfo? current = new(Directory.GetCurrentDirectory());
-
- while (current is not null)
- {
- if (Directory.Exists(Path.Combine(current.FullName, ".git")))
- {
- return current.FullName;
- }
-
- current = current.Parent;
- }
-
- return null;
- }
- }
-
- private static void Notify(string message)
- {
- Console.ForegroundColor = ConsoleColor.Cyan;
- try
- {
- Console.WriteLine(message);
- }
- finally
- {
- Console.ResetColor();
- }
- }
-}
diff --git a/dotnet/samples/03-workflows/Declarative/GenerateCode/Properties/launchSettings.json b/dotnet/samples/03-workflows/Declarative/GenerateCode/Properties/launchSettings.json
deleted file mode 100644
index 692664eb00..0000000000
--- a/dotnet/samples/03-workflows/Declarative/GenerateCode/Properties/launchSettings.json
+++ /dev/null
@@ -1,28 +0,0 @@
-{
- "profiles": {
- "Marketing": {
- "commandName": "Project",
- "commandLineArgs": "\"Marketing.yaml\""
- },
- "MathChat": {
- "commandName": "Project",
- "commandLineArgs": "\"MathChat.yaml\""
- },
- "Question": {
- "commandName": "Project",
- "commandLineArgs": "\"Question.yaml\""
- },
- "Research": {
- "commandName": "Project",
- "commandLineArgs": "\"DeepResearch.yaml\""
- },
- "ResponseObject": {
- "commandName": "Project",
- "commandLineArgs": "\"ResponseObject.yaml\""
- },
- "UserInput": {
- "commandName": "Project",
- "commandLineArgs": "\"UserInput.yaml\""
- }
- }
-}
diff --git a/dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/CodeGen/ActionTemplate.cs b/dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/CodeGen/ActionTemplate.cs
deleted file mode 100644
index aece124f66..0000000000
--- a/dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/CodeGen/ActionTemplate.cs
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright (c) Microsoft. All rights reserved.
-
-using Microsoft.Agents.AI.Workflows.Declarative.Extensions;
-using Microsoft.Agents.AI.Workflows.Declarative.Interpreter;
-using Microsoft.Agents.ObjectModel;
-
-namespace Microsoft.Agents.AI.Workflows.Declarative.CodeGen;
-
-internal abstract class ActionTemplate : CodeTemplate, IModeledAction
-{
- public string Id { get; private set; } = string.Empty;
-
- public string Name { get; private set; } = string.Empty;
-
- public string ParentId { get; private set; } = string.Empty;
-
- public bool UseAgentProvider { get; init; }
-
- protected TAction Initialize(TAction model) where TAction : DialogAction
- {
- this.Id = model.GetId();
- this.ParentId = model.GetParentId() ?? WorkflowActionVisitor.Steps.Root();
- this.Name = this.Id.FormatType();
-
- return model;
- }
-}
diff --git a/dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/CodeGen/AddConversationMessageTemplate.cs b/dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/CodeGen/AddConversationMessageTemplate.cs
deleted file mode 100644
index 0064483589..0000000000
--- a/dotnet/src/Microsoft.Agents.AI.Workflows.Declarative/CodeGen/AddConversationMessageTemplate.cs
+++ /dev/null
@@ -1,395 +0,0 @@
-// ------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-// Runtime Version: 18.0.0.0
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-// ------------------------------------------------------------------------------
-namespace Microsoft.Agents.AI.Workflows.Declarative.CodeGen
-{
- using Microsoft.Agents.AI.Workflows.Declarative.Extensions;
- using Microsoft.Agents.ObjectModel;
- using System;
-
- ///
- /// Class to produce the template output
- ///
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.TextTemplating", "18.0.0.0")]
- internal partial class AddConversationMessageTemplate : ActionTemplate
- {
- ///
- /// Create the template output
- ///
- public override string TransformText()
- {
- this.Write("\n");
- this.Write("\n");
- this.Write("\n");
- this.Write("\n");
- this.Write("\n");
- this.Write("\n");
- this.Write("\n");
- this.Write("\n");
- this.Write("\n/// \n/// Adds a new message to the specified agent conversation\n/// \ninternal sealed class ");
- this.Write(this.ToStringHelper.ToStringWithCulture(this.Name));
- this.Write("Executor(FormulaSession session, ResponseAgentProvider agentProvider) : ActionExe" +
- "cutor(id: \"");
- this.Write(this.ToStringHelper.ToStringWithCulture(this.Id));
- this.Write("\", session)\n{\n // \n protected override async ValueTask