Repository navigation
Conversation
The BinaryScanTest.ScanForBinaries test has been failing on all main official builds since June 5 because the SDK bootstrap installs to src/sdk/.dotnet/ (via dotnetup) and the existing .dotnet/ exclusion only matches the root-level directory. The SDK global.json has runtimes defined, which causes tools.sh to fall back to repo-local .dotnet instead of using the VMR root .dotnet/. The switch from dotnet-install.sh to dotnetup introduced new binaries (dotnet-watch satellite assemblies and hotreload shims) that were not previously present. This adds **/.dotnet/ to match .dotnet directories at any depth. This may not be the correct long-term fix - the right solution may be to ensure dotnetup installs to the root .dotnet/ or to handle the nested bootstrap differently. Co-authored-by: Copilot <[email protected]>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the source-build binary allowlist to account for nested SDK bootstrap directories (e.g., src/sdk/.dotnet/) so source-build binary scanning doesn’t flag bootstrap SDK/tooling binaries introduced by the newer dotnetup install layout.
Changes:
- Add a recursive allowlist entry for
.dotnet/directories at any repo depth (**/.dotnet/) in the source-build allowlist.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
lewing
marked this pull request as draft
June 6, 2026 22:30
lewing
marked this pull request as ready for review
June 7, 2026 03:26
steveisok
approved these changes
Jun 7, 2026
ViktorHofer
requested changes
Jun 8, 2026
ViktorHofer
left a comment
Member
There was a problem hiding this comment.
The inner repo .dotnet folders shouldn't exist at all. This is working around an infra regression.
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.
Summary
Adds
**/.dotnet/to the allowed source-build binaries list to fix BinaryScan test failures on shortstack build legs.Root Cause (verified from build logs)
SDK code flow PR #7064 (merged June 5) introduced
src/sdk/eng/configure-toolset.sh, which callsdotnetup sdk installto pre-install a bootstrap SDK intosrc/sdk/.dotnet/. This directory never existed before — the passing build 2990093 (June 2) has zero references tosrc/sdk/.dotnetorconfigure-toolsetin its logs.In the first failing build 2993249 (June 5), the sequence is:
configure-toolset.shrunsdotnetup sdk install→ createssrc/sdk/.dotnet/with a full SDK (2623 binaries)init-detect-binaries.projruns the binary scan, finds all 2623 binaries unmatchedBinaryScanTest.ScanForBinariesreads the report and failsconfigure-toolset.shhas afrom_vmr == trueguard that should skip the install in VMR builds, but it's not taking effect in the shortstack build context.The existing exclusion
.dotnet/inallowed-sb-binaries.txtonly matches the root-level.dotnet/directory. The nestedsrc/sdk/.dotnet/is not covered.Fix
Adding
**/.dotnet/matches.dotnet/directories at any depth. Verified locally thatMicrosoft.Extensions.FileSystemGlobbing.Matchercorrectly matches paths likesrc/sdk/.dotnet/sdk/.../file.dllwith this pattern.Open questions
from_vmris properly set whenconfigure-toolset.shruns in shortstack builds, so thedotnetupinstall is skipped entirely?cc @dotnet/source-build @dotnet/dotnet-cli