Skip to content

Build | Correct references to Microsoft.SqlServer.Server in Visual Studio builds#4003

Merged
mdaigle merged 2 commits intodotnet:mainfrom
edwardneal:build/visual-studio
Apr 17, 2026
Merged

Build | Correct references to Microsoft.SqlServer.Server in Visual Studio builds#4003
mdaigle merged 2 commits intodotnet:mainfrom
edwardneal:build/visual-studio

Conversation

@edwardneal
Copy link
Copy Markdown
Contributor

Description

This follows up my previous PR - I can't currently build via Visual Studio. Upon trying to do so, the net8.0, net9.0 and net10.0 targets for ManualTests fail with the error:

The type 'IBinarySerialize' is defined in an assembly that is not referenced. You must add a reference to assembly 'Microsoft.SqlServer.Server, Version=7.0.0.0, Culture=neutral, PublicKeyToken=null'.

The versioning for Microsoft.SqlServer.Server is also wrong because the package is versioned independently of SqlClient and its associated libraries, but this doesn't break the build - and more importantly, threading the package-specific versions into Microsoft.SqlServer.Server just changes the version in the error message:

The type 'IBinarySerialize' is defined in an assembly that is not referenced. You must add a reference to assembly 'Microsoft.SqlServer.Server, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.

Converting netcore's unconditional PackageReference into the newer style of PackageReference/ProjectReference fixes this problem.

Just to neaten up the version numbers and dependencies, we then return to Microsoft.SqlServer.Server and bring the build configuration into the same style as the Abstractions project file, adding the various version-related properties and making sure that these are threaded into the nuspec.

Issues

None.

Testing

Visual Studio builds from scratch. build.proj continues to function properly, setting correct dependencies on Microsoft.SqlServer.Server. I can continue to execute UDT-based tests in ManualTests, so the updated DLL loads properly.

@edwardneal edwardneal requested a review from a team as a code owner March 5, 2026 19:14
@github-project-automation github-project-automation Bot moved this to To triage in SqlClient Board Mar 5, 2026
Comment thread tools/targets/GenerateMdsPackage.targets Outdated
Comment thread src/Microsoft.Data.SqlClient/src/Microsoft.Data.SqlClient.csproj
@github-project-automation github-project-automation Bot moved this from To triage to In progress in SqlClient Board Mar 6, 2026
@paulmedynski
Copy link
Copy Markdown
Contributor

I'll trigger the pipelines once you add the SqlServer version to the several place the YAML needs it.

@paulmedynski paulmedynski added this to the 7.0.0 milestone Mar 9, 2026
@paulmedynski paulmedynski added the Area\Engineering Use this for issues that are targeted for changes in the 'eng' folder or build systems. label Mar 9, 2026
@mdaigle
Copy link
Copy Markdown
Contributor

mdaigle commented Mar 9, 2026

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 2 pipeline(s).

@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 9, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 64.39%. Comparing base (14b96a2) to head (1d0c9bb).
⚠️ Report is 68 commits behind head on main.

❗ There is a different number of reports uploaded between BASE (14b96a2) and HEAD (1d0c9bb). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (14b96a2) HEAD (1d0c9bb)
CI-SqlClient 1 0
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #4003       +/-   ##
===========================================
- Coverage   74.62%   64.39%   -10.24%     
===========================================
  Files         280      271        -9     
  Lines       43814    65716    +21902     
===========================================
+ Hits        32698    42317     +9619     
- Misses      11116    23399    +12283     
Flag Coverage Δ
CI-SqlClient ?
PR-SqlClient-Project 64.39% <ø> (?)

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.

@paulmedynski paulmedynski self-assigned this Mar 10, 2026
paulmedynski
paulmedynski previously approved these changes Mar 10, 2026
@paulmedynski
Copy link
Copy Markdown
Contributor

@edwardneal The pipeline errors appear to be caused by a missing property value on the nuget command line.

@edwardneal
Copy link
Copy Markdown
Contributor Author

I think I see the problem, thanks @paulmedynski. Does the pipeline configuration need to define sqlServerArtifactsName and sqlServerPackageVersion variables? It looks like the root cause is that these aren't being substituted by the pipeline.

@mdaigle
Copy link
Copy Markdown
Contributor

mdaigle commented Mar 10, 2026

I believe those need to be defined in the variables yml file. Look for the other version variables, they should be defined in the same spot.

@edwardneal
Copy link
Copy Markdown
Contributor Author

Thanks - I think I've found them, could you rerun CI please?

@mdaigle
Copy link
Copy Markdown
Contributor

mdaigle commented Mar 11, 2026

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 2 pipeline(s).

@cheenamalhotra cheenamalhotra moved this from In progress to In review in SqlClient Board Mar 11, 2026
@edwardneal
Copy link
Copy Markdown
Contributor Author

I think the remaining CI error is fixed with the most recent commit - we were never building the SqlServer package.

@paulmedynski
Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 2 pipeline(s).

@paulmedynski
Copy link
Copy Markdown
Contributor

I'm going to move this out to post-7.0 GA. There are several internal pipelines that will also need to be tested and it may be easier for one of us (maintainers) do the work and iterate.

@paulmedynski paulmedynski modified the milestones: 7.0.0, 7.1.0-preview1 Mar 11, 2026
@edwardneal edwardneal force-pushed the build/visual-studio branch from a04e090 to 70c3893 Compare March 14, 2026 13:30
@edwardneal
Copy link
Copy Markdown
Contributor Author

That makes sense. I've reverted the pipeline-based changes to avoid conflicts in the interim.

@github-actions
Copy link
Copy Markdown

This pull request has been marked as stale due to inactivity for more than 30 days.

If you would like to keep this pull request open, please provide an update or respond to any comments. Otherwise, it will be closed automatically in 7 days.

@github-actions github-actions Bot added the Stale The Issue or PR has become stale and will be automatically closed shortly if no activity occurs. label Apr 14, 2026
@paulmedynski paulmedynski removed the Stale The Issue or PR has become stale and will be automatically closed shortly if no activity occurs. label Apr 14, 2026
@paulmedynski
Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 2 pipeline(s).

@mdaigle mdaigle modified the milestone: 7.1.0-preview1 Apr 17, 2026
@mdaigle mdaigle enabled auto-merge (squash) April 17, 2026 20:59
@mdaigle mdaigle merged commit ed1661f into dotnet:main Apr 17, 2026
299 of 300 checks passed
@github-project-automation github-project-automation Bot moved this from In review to Done in SqlClient Board Apr 17, 2026
@edwardneal edwardneal deleted the build/visual-studio branch April 17, 2026 21:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area\Engineering Use this for issues that are targeted for changes in the 'eng' folder or build systems.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants