You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
MSBuildBinaryLog: Retrieve inner assets files for multi-target project - #1891
When using the MSBuildBinaryLog detector with a multi-target project, any information from the project, such as <IsShipping>false</IsShipping> isn't applied and a warning is logged:
No ProjectAssetsFile property found in binlog for project [...]
This is because the outer builder doesn't really have an asset file, each inner build does (even though it's shared).
Solution
This PR now iterates through all inner builds to map the assets file to its matching project.
Two unit tests, which were failing before the changes, have been added.
The recursive merge can discard a development-only classification. MergeWith merges every nullable boolean with “true wins” (MSBuildProjectInfo.cs:257-262), but IsShipping has inverted semantics: false marks all dependencies as development dependencies (MSBuildBinaryLogComponentDetector.cs:201-204, also documented in docs/detectors/nuget.md:52). If one binlog reports an inner build as shipping and a later build/publish binlog reports IsShipping=false, this call retains true, so the dependencies are incorrectly classified as shipping. Merge IsShipping with false-wins semantics and add a conflicting multi-binlog inner-build regression test.
🧠 Review effort: Balanced
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
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.
Problem
When using the MSBuildBinaryLog detector with a multi-target project, any information from the project, such as
<IsShipping>false</IsShipping>isn't applied and a warning is logged:This is because the outer builder doesn't really have an asset file, each inner build does (even though it's shared).
Solution
This PR now iterates through all inner builds to map the assets file to its matching project.
Two unit tests, which were failing before the changes, have been added.