Fix non-deterministic NuGet packages by enabling ContinuousIntegrationBuild for OneBranch builds#4251
Merged
Merged
Conversation
…nBuild for OneBranch builds
Contributor
There was a problem hiding this comment.
Pull request overview
This PR restores deterministic OneBranch-produced NuGet packages by introducing a BuildForRelease MSBuild property (defaulting to false) and using it to drive ContinuousIntegrationBuild for OneBranch builds, enabling portable source paths in embedded PDBs.
Changes:
- Add
BuildForReleasetosrc/Directory.Build.propsand defaultContinuousIntegrationBuildto$(BuildForRelease)when not explicitly set. - Set
BuildForRelease: truein the OneBranch official pipeline. - Set
BuildForRelease: truein the OneBranch non-official pipeline to exercise the deterministic build path.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/Directory.Build.props | Introduces BuildForRelease and gates ContinuousIntegrationBuild defaults to enable deterministic source paths for release builds. |
| eng/pipelines/onebranch/sqlclient-official.yml | Sets BuildForRelease=true for official OneBranch builds. |
| eng/pipelines/onebranch/sqlclient-non-official.yml | Sets BuildForRelease=true for non-official OneBranch builds to validate determinism in pre-release runs. |
paulmedynski
requested changes
Apr 30, 2026
paulmedynski
approved these changes
Apr 30, 2026
benrr101
approved these changes
Apr 30, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4251 +/- ##
==========================================
- Coverage 66.05% 64.29% -1.76%
==========================================
Files 277 272 -5
Lines 42988 65783 +22795
==========================================
+ Hits 28396 42297 +13901
- Misses 14592 23486 +8894
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
paulmedynski
pushed a commit
that referenced
this pull request
May 7, 2026
…nBuild for OneBranch builds (#4251)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Restore deterministic builds for OneBranch-produced NuGet packages so they pass NuGet Package Explorer's "Deterministic (build)" check.
Introduced a
BuildForReleasegate insrc/Directory.Build.propsthat drivesContinuousIntegrationBuild. The two OneBranch pipelines setBuildForRelease: true; PR/CI and local dev builds are unchanged.Testing
The official and non-official run should validate this change.
Guidelines
Please review the contribution guidelines before submitting a pull request: