mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
.NET: Add additional build, test and project structure skills (#3987)
* Add additional build, test and project structure skills * Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
Unverified
parent
79b4680cec
commit
a5f948c215
+43
@@ -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.
|
||||
@@ -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 `<Source-Code-Project>.UnitTests` or `<Source-Code-Project>.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) |
|
||||
+1
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user