Skip to content

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

Open
edwardneal wants to merge 6 commits intodotnet:mainfrom
edwardneal:build/visual-studio
Open

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

Conversation

@edwardneal
Copy link
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
@github-project-automation github-project-automation bot moved this from To triage to In progress in SqlClient Board Mar 6, 2026
@paulmedynski
Copy link
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
Contributor

mdaigle commented Mar 9, 2026

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@codecov
Copy link

codecov bot commented Mar 9, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 64.92%. Comparing base (3303d80) to head (ae2e17f).
⚠️ Report is 8 commits behind head on main.

❗ There is a different number of reports uploaded between BASE (3303d80) and HEAD (ae2e17f). Click for more details.

HEAD has 2 uploads less than BASE
Flag BASE (3303d80) HEAD (ae2e17f)
CI-SqlClient 2 0
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4003      +/-   ##
==========================================
- Coverage   74.38%   64.92%   -9.47%     
==========================================
  Files         287      282       -5     
  Lines       43982    66073   +22091     
==========================================
+ Hits        32717    42896   +10179     
- Misses      11265    23177   +11912     
Flag Coverage Δ
CI-SqlClient ?
PR-SqlClient-Project 64.92% <ø> (?)

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
Contributor

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

@edwardneal
Copy link
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
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
Contributor Author

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

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: In progress

Development

Successfully merging this pull request may close these issues.

3 participants