|
2 | 2 |
|
3 | 3 | This repository contains the official C# SDK for the Model Context Protocol (MCP), enabling .NET applications to implement and interact with MCP clients and servers. |
4 | 4 |
|
| 5 | +## Critical: Always Build and Test |
| 6 | + |
| 7 | +**ALWAYS build and run tests before declaring any task complete or making a pull request.** |
| 8 | + |
| 9 | +When making code changes: |
| 10 | +1. **Build first**: Run `dotnet build` or `make build` to ensure the code compiles without errors |
| 11 | +2. **Run tests**: Execute `dotnet test --filter '(Execution!=Manual)'` or `make test` to verify all tests pass |
| 12 | +3. **Fix issues**: Address any build errors or test failures before proceeding |
| 13 | +4. **Verify iteratively**: Build and test frequently during development, not just at the end |
| 14 | +5. **Check warnings**: Treat warnings as errors - the build is configured with `TreatWarningsAsErrors=true` |
| 15 | + |
| 16 | +**Never skip these steps.** Even small changes can have unexpected impacts. A passing build and test suite is the minimum bar for any code change. |
| 17 | + |
5 | 18 | ## Project Overview |
6 | 19 |
|
7 | 20 | The SDK consists of three main packages: |
@@ -97,6 +110,16 @@ The SDK consists of three main packages: |
97 | 110 | - **Test**: `dotnet test` or `make test` |
98 | 111 | - **Clean**: `dotnet clean` or `make clean` |
99 | 112 |
|
| 113 | +### Development Workflow |
| 114 | +**Critical**: Always follow this workflow when making changes: |
| 115 | +1. Make code changes |
| 116 | +2. Build immediately: `dotnet build` - fix any compilation errors |
| 117 | +3. Run tests: `dotnet test --filter '(Execution!=Manual)'` - fix any test failures |
| 118 | +4. Repeat steps 1-3 iteratively as you develop |
| 119 | +5. Only after successful build and tests should you consider the change complete |
| 120 | + |
| 121 | +Do not skip or defer building and testing. These are mandatory steps for every code change, no matter how small. |
| 122 | + |
100 | 123 | ### SDK Requirements |
101 | 124 | - The repo currently requires the .NET SDK 10.0 to build and run tests. |
102 | 125 | - Target frameworks: .NET 10.0, .NET 9.0, .NET 8.0, .NET Standard 2.0 |
|
0 commit comments