Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ This project includes several key products and libraries that facilitate SQL Ser
## 🛠️ Key Features
- **Connectivity to SQL Server**: Provides robust and secure connections to SQL Server databases, using various authentication methods, such as Windows Authentication, SQL Server Authentication, and Entra ID authentication, e.g. `ActiveDirectoryIntegrated`, `ActiveDirectoryPassword`, `ActiveDirectoryServicePrincipal`,`ActiveDirectoryInteractive`, `ActiveDirectoryDefault`, and `ActiveDirectoryManagedIdentity`.
- **Connection Resiliency**: Implements connection resiliency features to handle transient faults and network issues, ensuring reliable database connectivity.
- **TLS Encryption**: Supports secure connections using TLS protocols to encrypt data in transit. Supports TLS 1.2 and higher, ensuring secure communication with SQL Server. Supported encryption modes are:
- **TLS Encryption**: Supports secure connections using TLS protocols to encrypt data in transit. Supports TLS 1.2 and higher, ensuring secure communication with SQL Server. Supported encryption modes are:
- **Optional**: Encryption is used if available, but not required.
- **Mandatory**: Encryption is mandatory for the connection.
- **Strict**: Enforces strict TLS requirements, ensuring only secure connections are established.
Expand Down Expand Up @@ -123,7 +123,7 @@ When a new issue is created, follow these steps:
- Ensure the PR passes all CI checks before merging.

### ✅ Closing Issues
- Add a comment summarizing the fix and referencing the PR
- Add a comment summarizing the fix and referencing the PR

### ⚙️ Automating Workflows
- Auto-label PRs based on folder paths (e.g., changes in `src/Microsoft.Data.SqlClient/src/` → `Area\SqlClient`, changes in `tests/` → `Area\Testing`) and whether they add new public APIs or introduce a breaking change.
Expand Down
2 changes: 1 addition & 1 deletion .github/instructions/ado-pipelines.instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Key parameters:
- `runAlwaysEncryptedTests` — include AE test set; default `true`
- `runLegacySqlTests` — include SQL Server 2016/2017 manual-test legs; default `true`
- `debug` — enable debug output; default `false`
- `dotnetVerbosity` — MSBuild verbosity; default `normal`
- `dotnetVerbosity` — build verbosity; default `normal`

## Build Stage Order

Expand Down
2 changes: 1 addition & 1 deletion .github/instructions/architecture.instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ The `netcore/` and `netfx/` directories are legacy artifacts from the old dual-p
- `netcore/ref/` and `netfx/ref/` — **STILL ACTIVE**. Reference assemblies remain in these directories and define the public API surface for each target framework.

### OS Targeting with `TargetOs`
The unified project uses a `TargetOs` MSBuild property to handle OS-specific compilation:
The unified project uses a `TargetOs` build property to handle OS-specific compilation:

```xml
<!-- Automatic OS detection -->
Expand Down
23 changes: 9 additions & 14 deletions .github/instructions/testing.instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ The default test filter is defined in `build.proj` via `TestFilters`:
```xml
<TestFilters Condition="'$(TestFilters)' == ''">category!=failing&amp;category!=flaky&amp;category!=interactive</TestFilters>
```
This can be overridden via MSBuild property: `msbuild build.proj -t:TestSqlClientUnit -p:TestFilters="your_filter"`.
This can be overridden via build property: `dotnet build build.proj -t:TestSqlClientUnit -p:TestFilters="your_filter"`.

### Test Attributes
```csharp
Expand All @@ -139,19 +139,19 @@ public void TestIntermittentlyFails() { ... }

## Running Tests

### Using MSBuild (Recommended)
### Using `build.proj` targets (Recommended)
```bash
# Build and run all unit tests
msbuild build.proj -t:TestSqlClientUnit
dotnet build build.proj -t:TestSqlClientUnit

# Run functional tests only
msbuild build.proj -t:TestSqlClientFunctional
dotnet build build.proj -t:TestSqlClientFunctional

# Run manual tests for specific framework
msbuild build.proj -t:TestSqlClientManual -p:TestFramework=net8.0
dotnet build build.proj -t:TestSqlClientManual -p:TestFramework=net8.0

# Run specific test set
msbuild build.proj -t:TestSqlClientManual -p:TestSet=1
dotnet build build.proj -t:TestSqlClientManual -p:TestSet=1
```

### Using dotnet CLI
Expand Down Expand Up @@ -325,7 +325,7 @@ AssertExtensions.ThrowsContains<SqlException>(() => action(), "expected message"

### Running with Coverage
```bash
msbuild build.proj -t:TestSqlClientUnit -p:TestCodeCoverage=true
dotnet build build.proj -t:TestSqlClientUnit -p:TestCodeCoverage=true
```

### Coverage Targets
Expand All @@ -335,16 +335,11 @@ msbuild build.proj -t:TestSqlClientUnit -p:TestCodeCoverage=true

## Debugging Tests

### Visual Studio
### IDE
1. Set breakpoints in test code
2. Right-click test → Debug Test
2. Right-click test → Debug Test (or use CodeLens "Debug Test" link)
3. Use Test Explorer for navigation

### VS Code
1. Configure C# extension
2. Use CodeLens "Debug Test" link
3. Attach to test process

### Command Line
```bash
# Enable verbose output
Expand Down
12 changes: 6 additions & 6 deletions .github/plans/apicompat-ref-assembly-validation.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ The comparison uses `Microsoft.DotNet.ApiCompat.Tool` in **strict mode**, which
## Usage

```
dotnet msbuild build.proj /t:CompareRefAssemblies /p:BaselinePackageVersion=6.1.4
dotnet build build.proj /t:CompareMdsRefAssemblies /p:BaselinePackageVersion=6.1.4
```
Comment thread
paulmedynski marked this conversation as resolved.

- `BaselinePackageVersion` is **required** (no default). The user must specify which published package to compare against.
Expand All @@ -22,7 +22,7 @@ dotnet msbuild build.proj /t:CompareRefAssemblies /p:BaselinePackageVersion=6.1.

Add an entry for version `9.0.200` alongside the existing `dotnet-coverage` entry. This enables `dotnet apicompat` after `dotnet tool restore`.

### 2. Create `tools/targets/CompareRefAssemblies.targets`
### 2. Create `tools/targets/CompareMdsRefAssemblies.targets`

A single new file containing all properties, items, and targets (steps 3–11 below). Follows the naming convention of existing files like `GenerateMdsPackage.targets`.

Expand Down Expand Up @@ -85,7 +85,7 @@ Runs `<Exec Command="dotnet tool restore" WorkingDirectory="$(RepoRoot)" />`.
- Preceded by `<Message Importance="high">` labelling each comparison
- Uses item metadata to map `net462` to `$(LegacyNetFxRefDir)` and others to `$(LegacyNetCoreRefDir)`

### 11. `CompareRefAssemblies` target (public entry point)
### 11. `CompareMdsRefAssemblies` target (public entry point)

- Declared with `DependsOnTargets="_RunRefApiCompat"`
- Emits a final `<Message>` summarizing completion
Expand All @@ -95,12 +95,12 @@ Runs `<Exec Command="dotnet tool restore" WorkingDirectory="$(RepoRoot)" />`.
Add one line after the existing `.targets` imports (after line 7):

```xml
<Import Project="$(ToolsDir)targets\CompareRefAssemblies.targets" />
<Import Project="$(ToolsDir)targets\CompareMdsRefAssemblies.targets" />
```

## Design Decisions

- **Single new file** at `tools/targets/CompareRefAssemblies.targets` — only one `<Import>` line added to `build.proj`.
- **Single new file** at `tools/targets/CompareMdsRefAssemblies.targets` — only one `<Import>` line added to `build.proj`.
- **Internal targets prefixed with `_`** to signal they're not intended to be called directly.
- **Strict mode** ensures API additions are also flagged — important for detecting accidental public surface changes during file reorganization.
- **`ContinueOnError="ErrorAndContinue"`** on each apicompat `Exec` so all 8 comparisons run and all differences are reported together.
Expand All @@ -111,7 +111,7 @@ Add one line after the existing `.targets` imports (after line 7):
## Verification

```
dotnet msbuild build.proj /t:CompareRefAssemblies /p:BaselinePackageVersion=6.1.4
dotnet build build.proj /t:CompareMdsRefAssemblies /p:BaselinePackageVersion=6.1.4
```

- Downloads 6.1.4 nupkg, builds both ref project variants, runs 8 comparisons (4 TFMs × 2 variants).
Expand Down
Loading
Loading