Skip to content

Merge | Not Supported Binaries / Test Targets#3997

Open
benrr101 wants to merge 21 commits intomainfrom
dev/russellben/common/notsupported
Open

Merge | Not Supported Binaries / Test Targets#3997
benrr101 wants to merge 21 commits intomainfrom
dev/russellben/common/notsupported

Conversation

@benrr101
Copy link
Contributor

@benrr101 benrr101 commented Mar 4, 2026

Description

This PR consists of two main changes:

Add test targets to build2.proj

  • Expand upon the build parameter descriptions
  • Add targets for testing via dotnet
  • Targets are not wired up to anything yet, but they will be used soon

Generate "Not Supported" assemblies from common MDS

  • Add a new project to generate Not Supported assemblies, with much description and much explanation on how to use it
    • This removes dependency on GenerateNotSupported.targets and ResolveContract.targets
  • Add GenAPI projects to solution for reference purposes they are not built with the solution
  • Add generated not supported source files to the .gitignore
  • Add build2.proj target that generates the not supported targets they are not wired up to anything yet, but they will be used soon
  • Build GenAPI as part of BuildMdsNotSupported target
    • Don't worry about special paths for output of it, just dump it to the default bin output
    • Only build for one target framework (net9.0 was chosen)
  • Update GenerateNotSupported.targets to pick up the changes to paths.

Msc Changes

  • Dump ref binaries to a better place in the artifacts folder
  • Strong name sign ref binaries
  • Bring back disabling common MDS net462 building when building for unix

Issues

N/A

Testing

Running targets locally work as expected. Hopefully there are no major issues with the pipelines, since most of the changes don't affect existing pipelines.

@benrr101 benrr101 added this to the 7.0.0 milestone Mar 4, 2026
@benrr101 benrr101 requested a review from a team as a code owner March 4, 2026 19:08
@benrr101 benrr101 added the Common Project 🚮 Things that relate to the common project project label Mar 4, 2026
Copilot AI review requested due to automatic review settings March 4, 2026 19:08
@github-project-automation github-project-automation bot moved this to To triage in SqlClient Board Mar 4, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR makes two main changes: (1) adds test targets to build2.proj with detailed parameter documentation for running MDS tests via MSBuild, and (2) creates a new dedicated project (notsupported/) to generate "Not Supported" assemblies from the common MDS ref project using GenAPI, replacing the previous approach that was embedded in the netcore/netfx projects. Additional changes include strong-name signing for ref binaries, updated output paths for ref assemblies, conditional exclusion of net462 from Unix builds, and GenAPI project updates to target a single framework (net9.0).

Changes:

  • New notsupported/Microsoft.Data.SqlClient.csproj project and updated NotSupported.targets for generating PlatformNotSupportedException assemblies via GenAPI
  • Expanded build2.proj with test targets (TestMdsFunctional, TestMdsManual, TestMdsUnit), build targets (BuildMdsRef, BuildMdsNotSupported), and comprehensive parameter documentation
  • Conditional net462 exclusion on Unix, strong-name signing for ref binaries, and GenAPI project simplification to single net9.0 target

Reviewed changes

Copilot reviewed 8 out of 9 changed files in this pull request and generated 13 comments.

Show a summary per file
File Description
build2.proj Major expansion: imports, test/build targets, detailed parameter docs
tools/targets/NotSupported.targets Replaced old GenAPI variable setup with new paths/command, but Exec still uses old vars
src/Microsoft.Data.SqlClient/notsupported/Microsoft.Data.SqlClient.csproj New project to generate Not Supported assemblies via GenAPI
src/Microsoft.Data.SqlClient/src/Microsoft.Data.SqlClient.csproj Reordered TargetOs/TargetFrameworks, added signing, conditional net462 on Windows only
src/Microsoft.Data.SqlClient/ref/Microsoft.Data.SqlClient.csproj Added strong-name signing and custom output path under artifacts/
tools/GenAPI/Microsoft.DotNet.GenAPI/Microsoft.DotNet.GenAPI.csproj Simplified to single net9.0 target, removed custom OutputPath
tools/GenAPI/Microsoft.Cci.Extensions/Microsoft.Cci.Extensions.csproj Removed custom OutputPath
src/Microsoft.Data.SqlClient.sln Added notsupported, GenAPI, and Cci.Extensions projects (no build)
.gitignore Added pattern to ignore generated notsupported .cs files

benrr101 added 4 commits March 4, 2026 14:18
Ignore trx test results from git
Adding conditional net462 stuff to stress test Directory.Build.props
Adding TestUtilities reference to Azure test
Copilot AI review requested due to automatic review settings March 4, 2026 23:28
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 22 out of 23 changed files in this pull request and generated 5 comments.

benrr101 added 2 commits March 4, 2026 18:18
Remove redundant strong naming from common MDS
Fix typos as per copilot (why couldn't it find these the first time around??)
Copilot AI review requested due to automatic review settings March 5, 2026 01:03
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 22 out of 23 changed files in this pull request and generated 6 comments.

@paulmedynski paulmedynski self-assigned this Mar 5, 2026
Copy link
Contributor

@paulmedynski paulmedynski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly questions that may not result in any changes, but could become comments in the code to help maintainers.

@github-project-automation github-project-automation bot moved this from To triage to In progress in SqlClient Board Mar 5, 2026
Copilot AI review requested due to automatic review settings March 6, 2026 19:28
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 22 out of 23 changed files in this pull request and generated 3 comments.

@codecov
Copy link

codecov bot commented Mar 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 64.71%. Comparing base (569ada7) to head (2e332c6).

❗ There is a different number of reports uploaded between BASE (569ada7) and HEAD (2e332c6). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (569ada7) HEAD (2e332c6)
CI-SqlClient 1 0
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3997      +/-   ##
==========================================
- Coverage   72.36%   64.71%   -7.66%     
==========================================
  Files         287      282       -5     
  Lines       43149    66073   +22924     
==========================================
+ Hits        31223    42756   +11533     
- Misses      11926    23317   +11391     
Flag Coverage Δ
CI-SqlClient ?
PR-SqlClient-Project 64.71% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Common Project 🚮 Things that relate to the common project project

Projects

Status: In progress

Development

Successfully merging this pull request may close these issues.

5 participants