| name | implement-feature | |||||
|---|---|---|---|---|---|---|
| description | Guided workflow for implementing a new feature in Microsoft.Data.SqlClient. | |||||
| argument-hint | <feature name or issue number> | |||||
| agent | agent | |||||
| tools |
|
Implement the feature described in "${input:feature}".
Follow this workflow step-by-step:
- If a GitHub issue number is provided, fetch the full issue details from
dotnet/SqlClient. - Identify the feature scope, requirements, and acceptance criteria.
- Determine which platforms must be supported (.NET Framework 4.6.2, .NET 8.0, .NET 9.0).
- Check for related issues or prior discussions.
- If the feature involves a new connection string keyword, new data type, or TDS protocol change, note the additional areas impacted.
Before writing code, produce a brief implementation plan covering:
- Files to modify or create — all in
src/Microsoft.Data.SqlClient/src/. Never add to legacynetcore/src/ornetfx/src/. - Public API surface changes — any new classes, methods, properties, enums, or connection string keywords.
- Platform-specific considerations — will the feature need
.netfx.cs/.netcore.csor.windows.cs/.unix.csvariants? - Dependencies — any new NuGet packages or framework references needed?
- Test strategy — which test projects will cover this feature?
- Documentation plan — XML docs, samples, release notes entries.
- If adding new public APIs, update reference assemblies FIRST:
netcore/ref/Microsoft.Data.SqlClient.csand/orMicrosoft.Data.SqlClient.Manual.csfor .NET Core/.NET APIsnetfx/ref/Microsoft.Data.SqlClient.csfor .NET Framework APIsref/shared files if the API applies to batch or cross-framework features
- Include only the method/property signatures with no implementation.
- Add XML documentation comments on all public members.
- Add source files to
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/. - Use appropriate file suffixes for platform-specific code:
.netfx.csfor .NET Framework only.netcore.csfor .NET Core/.NET 8+ only.windows.csfor Windows-only code.unix.csfor Unix/Linux/macOS-only code
- Use conditional compilation:
#if NETFRAMEWORKfor net462 code paths#if NETfor net8.0+ code paths (NOT#if NETCOREAPP)#if _WINDOWSor#if _UNIXfor OS-specific code
- Ensure the code compiles for ALL target frameworks:
net462,net8.0,net9.0. - Follow the coding standards in
policy/coding-style.mdandpolicy/coding-best-practices.md.
- Add the keyword to
SqlConnectionStringBuilderwith getter/setter. - Update
DbConnectionStringKeywordsandDbConnectionStringDefaults. - Add parsing in the connection string parser.
- Default to a backward-compatible value.
- Add the keyword to the features reference in
.github/instructions/features.instructions.md.
- Reference the MS-TDS specification for the protocol extension.
- Add new token/flag constants to
TdsEnums.cs. - Implement parsing/writing in
TdsParser.csand related files. - Test against multiple SQL Server versions.
- Unit tests in
src/Microsoft.Data.SqlClient/tests/UnitTests/for isolated logic. - Functional tests in
src/Microsoft.Data.SqlClient/tests/FunctionalTests/for API behavior without SQL Server. - Manual tests in
src/Microsoft.Data.SqlClient/tests/ManualTests/for full integration with SQL Server. - Cover:
- Happy path and edge cases
- Both sync and async code paths where the feature exposes both variants
- Cross-platform behavior differences
- Error handling and invalid inputs
- Backward compatibility (existing behavior unchanged)
- Add XML doc comments on all new public APIs.
- Create a code sample in
doc/samples/demonstrating usage. - Update relevant
.github/instructions/files if the feature adds new architectural patterns.
- Summarize the feature and link to the issue.
- Provide a checklist:
- Reference assemblies updated (if public API changed)
- Tests added (unit, functional, manual as appropriate)
- Both sync and async code paths tested
- XML documentation on all public members
- Code sample added to
doc/samples/ - Compiles on all target frameworks (
net462,net8.0,net9.0) - No breaking changes to existing APIs
- Follows coding style (
policy/coding-style.md)