Files
ai-agent-harness/sources/stacks/dotnet-csharp.md

11 lines
1002 B
Markdown

## .NET and C#
- Treat the configured target framework, SDK, language version, nullable mode, application model, package versions, and solution layout as authoritative.
- Do not use APIs unavailable to the target framework or perform framework, project-format, or package migrations outside the approved scope.
- Preserve the repository's dependency-injection, configuration, logging, exception, serialization, and data-access conventions.
- Use async APIs for asynchronous I/O and avoid sync-over-async blocking such as `.Result` and `.Wait()`.
- Dispose `IDisposable` and `IAsyncDisposable` resources deterministically.
- For WinForms, preserve designer ownership, UI-thread access, event lifecycle, and the existing separation between generated designer code and hand-written code.
- Keep secrets and environment-specific endpoints out of source and committed configuration.
- Run the narrowest relevant restore, build, test, and analyzer commands supported by the repository and target framework.