Skip to content

Merge | Cleanup#4145

Open
benrr101 wants to merge 9 commits intomainfrom
dev/russellben/common/cleanup
Open

Merge | Cleanup#4145
benrr101 wants to merge 9 commits intomainfrom
dev/russellben/common/cleanup

Conversation

@benrr101
Copy link
Copy Markdown
Contributor

@benrr101 benrr101 commented Apr 6, 2026

Description

This PR will hopefully bring the separate codebases chapter of SqlClient history to a close. This PR cleans up the old separate projects and all the remaining cruft that was part of it.

  • Separate projects (netfx/netcore) and ref counterparts are deleted
  • Remove lingering reference to BuildAllConfigurations
  • Drop separate project targets from build.proj
  • Change non-production projects to output to the default bin/obj folders to enable ...
  • Drop properties from build.proj and Directory.Build.props that are no longer being used
  • Delete targets files and a couple props files that are no longer used

Issues

N/A

Testing

Local testing suggests this will pass. There's a lot of things intertwined with the directory.build.props and build.proj files so I expect some hiccups. But theoretically it should be easy.

@benrr101 benrr101 added this to the 7.1.0-preview1 milestone Apr 6, 2026
@benrr101 benrr101 requested a review from a team as a code owner April 6, 2026 23:47
Copilot AI review requested due to automatic review settings April 6, 2026 23:47
@benrr101 benrr101 added the Common Project 🚮 Things that relate to the common project project label Apr 6, 2026
@github-project-automation github-project-automation bot moved this to To triage in SqlClient Board Apr 6, 2026
Copy link
Copy Markdown
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 removes the remaining legacy netfx/netcore split-project infrastructure and related build/packaging targets, and updates test/tool projects to use the unified repo layout and default bin/obj outputs.

Changes:

  • Deletes obsolete MSBuild targets/props used by the historical netfx/netcore split (contract/not-supported/doc-trim/package-gen, etc.).
  • Updates test and tool .csproj files to reference dependencies via $(RepoRoot) and to use default output/intermediate paths.
  • Simplifies build.proj/OneBranch Roslyn-analyzer integration by removing legacy/default target assumptions.

Reviewed changes

Copilot reviewed 29 out of 29 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tools/targets/TrimDocsForIntelliSense.targets Removed obsolete XML doc trimming target.
tools/targets/ResolveContract.targets Removed legacy contract-resolution target.
tools/targets/NotSupported.targets Removed legacy “platform not supported” assembly generation target.
tools/targets/GenerateMdsPackage.targets Removed legacy nuspec-based MDS package generation target.
tools/props/Tools.props Removed unused tool-related props file.
tools/GenAPI/Directory.Build.props Removed GenAPI-local Directory.Build.props shim.
src/Microsoft.Data.SqlClient/tests/UnitTests/Microsoft.Data.SqlClient.UnitTests.csproj Updates project references to use $(RepoRoot) paths.
src/Microsoft.Data.SqlClient/tests/tools/TDS/TDS/TDS.csproj Simplifies to single TargetFramework and default output paths.
src/Microsoft.Data.SqlClient/tests/tools/TDS/TDS.Servers/TDS.Servers.csproj Updates project references to $(RepoRoot) paths and simplifies TFM/output settings.
src/Microsoft.Data.SqlClient/tests/tools/TDS/TDS.EndPoint/TDS.EndPoint.csproj Simplifies TFM/output settings and updates project reference paths.
src/Microsoft.Data.SqlClient/tests/tools/Microsoft.Data.SqlClient.TestUtilities/Microsoft.Data.SqlClient.TestUtilities.csproj Simplifies to single TargetFramework and default output paths.
src/Microsoft.Data.SqlClient/tests/tools/Microsoft.Data.SqlClient.ExtUtilities/Microsoft.Data.SqlClient.ExtUtilities.csproj Simplifies to single TargetFramework.
src/Microsoft.Data.SqlClient/tests/PerformanceTests/Microsoft.Data.SqlClient.PerformanceTests.csproj Moves to default output paths and modernizes conditional Project/Package reference selection.
src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/UdtTest/UDTs/Utf8String/Utf8String.csproj Removes legacy netfx/netcore output/target-group plumbing.
src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/UdtTest/UDTs/Shapes/Shapes.csproj Removes legacy netfx/netcore output/target-group plumbing.
src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/UdtTest/UDTs/Circle/Circle.csproj Removes legacy netfx/netcore output/target-group plumbing.
src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/UdtTest/UDTs/Address/Address.csproj Removes legacy netfx/netcore output/target-group plumbing.
src/Microsoft.Data.SqlClient/tests/ManualTests/Microsoft.Data.SqlClient.ManualTests.csproj Updates project references to use $(RepoRoot) paths.
src/Microsoft.Data.SqlClient/tests/FunctionalTests/Microsoft.Data.SqlClient.FunctionalTests.csproj Updates project references to use $(RepoRoot) paths.
src/Microsoft.Data.SqlClient/netfx/tools/targets/GenerateAssemblyRef.targets Deletes legacy netfx-only codegen target.
src/Microsoft.Data.SqlClient/netfx/tools/targets/GenerateAssemblyInfo.targets Deletes legacy netfx-only codegen target.
src/Microsoft.Data.SqlClient/netfx/src/Microsoft.Data.SqlClient.csproj Deletes legacy netfx driver project.
src/Microsoft.Data.SqlClient/netfx/ref/Microsoft.Data.SqlClient.csproj Deletes legacy netfx ref-assembly project.
src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj Deletes legacy netcore driver project.
src/Microsoft.Data.SqlClient/netcore/ref/Microsoft.Data.SqlClient.csproj Deletes legacy netcore ref-assembly project.
src/Microsoft.Data.SqlClient.slnx Updates solution structure to remove legacy netfx/netcore projects and adjust folder layout.
src/Directory.Build.props Removes legacy split-project path/OS properties; keeps minimal repo-wide build settings.
eng/pipelines/onebranch/steps/roslyn-analyzers-csproj-step.yml Removes BuildAllConfigurations default and simplifies analyzer invocation.
build.proj Removes legacy default target and legacy driver build/test orchestration; keeps extension/AKV/SqlServer targets.

Comment on lines 4 to 6
<Import Project="src/Directory.Build.props" />
<Import Project="$(ToolsDir)targets\GenerateMdsPackage.targets" />
<Import Project="$(ToolsDir)targets\CompareMdsRefAssemblies.targets" />

Copy link

Copilot AI Apr 6, 2026

Choose a reason for hiding this comment

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

build.proj still imports tools/targets/CompareMdsRefAssemblies.targets, but that target file currently depends on legacy properties/projects that this PR deletes (e.g., $(NetFxSource), $(NetCoreSource), $(ManagedSourceCode) and the legacy netfx/netcore ref csproj paths). As-is, invoking CompareMdsRefAssemblies will fail to locate the ref projects/output directories. Please either update CompareMdsRefAssemblies.targets to only use the consolidated ref project (and derive paths from $(RepoRoot)/current layout), or remove this import/target if legacy ref comparison is no longer supported.

Copilot uses AI. Check for mistakes.

<ToolsDir Condition="'$(ToolsDir)'==''">$(RepoRoot)tools\</ToolsDir>
<GenAPISrcDir Condition="'$(GenAPISrcDir)'==''">$(ToolsDir)GenAPI\</GenAPISrcDir>
<PackagesDir Condition="'$(PackagesDir)'==''">$(RepoRoot)packages\</PackagesDir>
Copy link

Copilot AI Apr 6, 2026

Choose a reason for hiding this comment

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

This change removes path properties like ManagedSourceCode, NetCoreSource, and NetFxSource, but tools/targets/CompareMdsRefAssemblies.targets still references them to locate ref projects/output (and also references now-deleted legacy netfx/netcore ref csprojs). Either reintroduce compatibility aliases for these properties here or update/remove CompareMdsRefAssemblies.targets so API-compat checks keep working with the new consolidated layout.

Suggested change
<PackagesDir Condition="'$(PackagesDir)'==''">$(RepoRoot)packages\</PackagesDir>
<PackagesDir Condition="'$(PackagesDir)'==''">$(RepoRoot)packages\</PackagesDir>
<!--
Compatibility aliases for legacy build/validation targets that still
reference the old dual-project layout while the repository uses the
consolidated multi-target source project.
-->
<ManagedSourceCode Condition="'$(ManagedSourceCode)'==''">$(ProjectDir)Microsoft.Data.SqlClient\src\</ManagedSourceCode>
<NetCoreSource Condition="'$(NetCoreSource)'==''">$(ProjectDir)Microsoft.Data.SqlClient\netcore\</NetCoreSource>
<NetFxSource Condition="'$(NetFxSource)'==''">$(ProjectDir)Microsoft.Data.SqlClient\netfx\</NetFxSource>

Copilot uses AI. Check for mistakes.
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: To triage

Development

Successfully merging this pull request may close these issues.

2 participants