From 18913dea1b175a2d70edfb8decae561e296a19bb Mon Sep 17 00:00:00 2001 From: westey <164392973+westey-m@users.noreply.github.com> Date: Fri, 13 Feb 2026 19:43:24 +0000 Subject: [PATCH 1/4] Add skill to verify samples --- .../skills/verify-dotnet-samples/SKILL.md | 85 +++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 dotnet/.github/skills/verify-dotnet-samples/SKILL.md diff --git a/dotnet/.github/skills/verify-dotnet-samples/SKILL.md b/dotnet/.github/skills/verify-dotnet-samples/SKILL.md new file mode 100644 index 0000000000..3896127e60 --- /dev/null +++ b/dotnet/.github/skills/verify-dotnet-samples/SKILL.md @@ -0,0 +1,85 @@ +--- +name: run-dotnet-samples +description: > + How to build, run and verify the .NET sample projects in the Agent Framework + repository. Use this when a user wants to verify that the samples still function + as expected. +--- + +# Verifying .NET Sample Projects + +## Sample Pre-requisites + +We should only support verifying samples that: +1. Use environment variables for configuration. +2. Have no complex setup requirements, e.g. where multiple applications need to be run together, or where we need to launch of browser, etc. + +Always report to the user which samples were run and which were not, and why. + +## Verifying a sample + +Samples should be verified to ensure that they actually work as intended and that their output matches what is expected. +For each sample that is run, output should be produced that shows the result and explains the reasoning about what output +was expected, what was produced, and why it didn't match what the sample was expected to produce. + +Steps to verify a sample: +1. Read the code for the sample +1. Check what environment variables are required for the sample +1. Check if each environment variable has been set +1. If there are any missing, give the user a list of missing environment variables to set and terminate +1. Summarize what the expected output of the sample should be +1. Run the sample +1. Show the user any output from the sample run as it gets produced, so that they can see the run progress +1. Check the output of the run against expectations +1. After running all requested samples, produce output for each sample that was verified: + 1. If expectations were matched, output the following: + ```text + [Sample Name] Succeeded + ``` + 1. If expectations were not matched, output the following: + ```text + [Sample Name] Failed + Actual Output: + [What the sample produced] + Expected Output: + [Explanation of what was expected and why the actual output didn't match expectations] + ``` + +## Environment Variables + +Most samples use environment variables to configure settings. + +```csharp +var endpoint = Environment.GetEnvironmentVariable("AZURE_OPENAI_ENDPOINT") ?? throw new InvalidOperationException("AZURE_OPENAI_ENDPOINT is not set."); +var deploymentName = Environment.GetEnvironmentVariable("AZURE_OPENAI_DEPLOYMENT_NAME") ?? "gpt-4o-mini"; +``` + +To run a sample, the environment variables should be set first. +Before running a sample, check whether each environment variable in the sample has a value and +then give the user a list of environment variables to set. + +You can provide the user some examples of how to set the variables like this: + +```bash +export AZURE_OPENAI_ENDPOINT="https://my-openai-instance.openai.azure.com/" +export AZURE_OPENAI_DEPLOYMENT_NAME="gpt-4o-mini" +``` + +To check if a variables has a value use e.g.: + +```bash +echo $AZURE_OPENAI_ENDPOINT +``` + +## How to Run a Sample (General Pattern) + +```bash +cd dotnet/samples// +dotnet run +``` + +For multi-targeted projects (e.g. Durable console apps), specify the framework: + +```bash +dotnet run --framework net10.0 +``` From 05281ff1317dcd06087cdaf712d7ead9c6f4b9a6 Mon Sep 17 00:00:00 2001 From: westey <164392973+westey-m@users.noreply.github.com> Date: Fri, 13 Feb 2026 19:49:56 +0000 Subject: [PATCH 2/4] Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- dotnet/.github/skills/verify-dotnet-samples/SKILL.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dotnet/.github/skills/verify-dotnet-samples/SKILL.md b/dotnet/.github/skills/verify-dotnet-samples/SKILL.md index 3896127e60..192ce1c4b9 100644 --- a/dotnet/.github/skills/verify-dotnet-samples/SKILL.md +++ b/dotnet/.github/skills/verify-dotnet-samples/SKILL.md @@ -65,7 +65,7 @@ export AZURE_OPENAI_ENDPOINT="https://my-openai-instance.openai.azure.com/" export AZURE_OPENAI_DEPLOYMENT_NAME="gpt-4o-mini" ``` -To check if a variables has a value use e.g.: +To check if a variable has a value use e.g.: ```bash echo $AZURE_OPENAI_ENDPOINT @@ -78,7 +78,7 @@ cd dotnet/samples// dotnet run ``` -For multi-targeted projects (e.g. Durable console apps), specify the framework: +For multi-targeted projects (e.g., Durable console apps), specify the framework: ```bash dotnet run --framework net10.0 From 60e93c43073c8ea5749d9493bd3c9a4d8aa8eb4f Mon Sep 17 00:00:00 2001 From: westey <164392973+westey-m@users.noreply.github.com> Date: Fri, 13 Feb 2026 19:50:24 +0000 Subject: [PATCH 3/4] Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- dotnet/.github/skills/verify-dotnet-samples/SKILL.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dotnet/.github/skills/verify-dotnet-samples/SKILL.md b/dotnet/.github/skills/verify-dotnet-samples/SKILL.md index 192ce1c4b9..64f76c65b0 100644 --- a/dotnet/.github/skills/verify-dotnet-samples/SKILL.md +++ b/dotnet/.github/skills/verify-dotnet-samples/SKILL.md @@ -12,7 +12,7 @@ description: > We should only support verifying samples that: 1. Use environment variables for configuration. -2. Have no complex setup requirements, e.g. where multiple applications need to be run together, or where we need to launch of browser, etc. +2. Have no complex setup requirements, e.g., where multiple applications need to be run together, or where we need to launch a browser, etc. Always report to the user which samples were run and which were not, and why. From 34d0ed3492ef048bb8a3aa35e1a9e1b99fe9d380 Mon Sep 17 00:00:00 2001 From: westey <164392973+westey-m@users.noreply.github.com> Date: Mon, 16 Feb 2026 11:25:05 +0000 Subject: [PATCH 4/4] tweak formatting --- dotnet/.github/skills/verify-dotnet-samples/SKILL.md | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/dotnet/.github/skills/verify-dotnet-samples/SKILL.md b/dotnet/.github/skills/verify-dotnet-samples/SKILL.md index 64f76c65b0..36e8a1d3bb 100644 --- a/dotnet/.github/skills/verify-dotnet-samples/SKILL.md +++ b/dotnet/.github/skills/verify-dotnet-samples/SKILL.md @@ -1,9 +1,6 @@ --- -name: run-dotnet-samples -description: > - How to build, run and verify the .NET sample projects in the Agent Framework - repository. Use this when a user wants to verify that the samples still function - as expected. +name: verify-dotnet-samples +description: > How to build, run and verify the .NET sample projects in the Agent Framework repository. Use this when a user wants to verify that the samples still function as expected. --- # Verifying .NET Sample Projects