diff --git a/dotnet/.github/skills/build-and-test/SKILL.md b/dotnet/.github/skills/build-and-test/SKILL.md new file mode 100644 index 0000000000..92c4a25935 --- /dev/null +++ b/dotnet/.github/skills/build-and-test/SKILL.md @@ -0,0 +1,43 @@ +--- +name: build-and-test +description: How to build and test .NET projects in the Agent Framework repository. Use this when verifying or testing changes. +--- + +# Build and Test + +- Only **UnitTest** projects need to be run locally; IntegrationTests require external dependencies. +- See `../project-structure/SKILL.md` for project structure details. + +## Speeding Up Builds + +The full solution is large. Use these shortcuts: + +| Change type | What to do | +|-------------|------------| +| Internal logic | Build only the affected project and its `*.UnitTests` project. Fix issues, then build the full solution and run all unit tests. | +| Public API surface | Build the full solution and run all unit tests immediately. | + +Example: Building a single code project for all target frameworks + +```bash +cd /workspaces/agent-framework/dotnet +dotnet build ./src/Microsoft.Agents.AI.Abstractions/Microsoft.Agents.AI.Abstractions.csproj +``` + +Example: Building a single code project for just .NET 10. + +```bash +cd /workspaces/agent-framework/dotnet +dotnet build ./src/Microsoft.Agents.AI.Abstractions/Microsoft.Agents.AI.Abstractions.csproj -f net10.0 +``` + +Example: Running tests for a single project using .net 10. + +```bash +cd /workspaces/agent-framework/dotnet +dotnet test ./tests/Microsoft.Agents.AI.Abstractions.UnitTests/Microsoft.Agents.AI.Abstractions.UnitTests.csproj -f net10.0 +``` + +### Multi-target framework tip + +Most projects target multiple .NET frameworks. If the affected code does **not** use `#if` directives for framework-specific logic, pass `--framework net10.0` to speed up building and testing. diff --git a/dotnet/.github/skills/project-structure/SKILL.md b/dotnet/.github/skills/project-structure/SKILL.md new file mode 100644 index 0000000000..f6e0d4f49b --- /dev/null +++ b/dotnet/.github/skills/project-structure/SKILL.md @@ -0,0 +1,15 @@ +--- +name: project-structure +description: Explains the project structure of the agent-framework .NET solution +--- + +# Agent Framework .NET Project Structure + +## Folders + +| Folder | Contents | +|--------|----------| +| `src/` | Source code projects | +| `tests/` | Test projects — named `.UnitTests` or `.IntegrationTests` | +| `samples/` | Sample projects | +| `src/Shared`, `src/LegacySupport` | Shared code files included by multiple source code projects (see README.md files in these folders or their subdirectories for instructions on how to include them in a project) | diff --git a/dotnet/.github/skills/verify-dotnet-samples/SKILL.md b/dotnet/.github/skills/verify-dotnet-samples/SKILL.md index 36e8a1d3bb..c51c55ea1c 100644 --- a/dotnet/.github/skills/verify-dotnet-samples/SKILL.md +++ b/dotnet/.github/skills/verify-dotnet-samples/SKILL.md @@ -1,6 +1,6 @@ --- 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. +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