Repository navigation
Honor explicit SelfContained=false in binlog detection - #1901
Greg Villicana (grvillic) merged 3 commits into
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
The new precedence can suppress positive AOT signals and misclassify self-contained inner builds.
2 open issues
What changed in this PR
This PR addresses #1893 by making explicit binlog self-containment values override the NuGet lock-file heuristic.
Changes:
- Adds a nullable binlog decision to distinguish explicit false from missing information.
- Adds regression coverage for framework-dependent libraries with runtime-pack downloads.
| File | Description |
|---|---|
| test/Microsoft.ComponentDetection.Detectors.Tests/nuget/MSBuildBinaryLogComponentDetectorTests.cs | Adds the explicit-false regression and runtime-pack fixture. |
| src/Microsoft.ComponentDetection.Detectors/nuget/MSBuildBinaryLogComponentDetector.cs | Prioritizes explicit binlog values over lock-file inference. |
Review effort: Balanced
There was a problem hiding this comment.
🔵 Needs a closer look
Self-containment detection incorrectly lets SelfContained=false suppress PublishAot=true and uses outer-build properties instead of per-target inner-build values, causing incorrect classifications.
2 open issues
Review effort: Balanced
5e12198
into
microsoft:main
|
👋 Hi! It looks like you modified some files in the
If none of the above scenarios apply, feel free to ignore this comment 🙂 |

Summary
SelfContainedvalue from the MSBuild binlog before considering the lock-file heuristic; retainPublishAot=trueas a positive self-contained signal.Fixes #1893
Reproduction
A library with
SelfContained=falsecan still haveMicrosoft.NETCore.App.Runtime.*download dependencies in its assets file. With that lock-file metadata and an explicit false binlog value, the detector previously reportedlibrary-selfcontained; it should reportlibrary. The regression test exercises that metadata and binlog combination.Changed files
src/Microsoft.ComponentDetection.Detectors/nuget/MSBuildBinaryLogComponentDetector.cstest/Microsoft.ComponentDetection.Detectors.Tests/nuget/MSBuildBinaryLogComponentDetectorTests.csValidation
git diff --checkpassed.