VS Manifest SBOM path is set explicitly & Build Fails when file doesn't exist#6788
Merged
donnie-msft merged 18 commits intodevfrom Sep 24, 2025
Merged
Conversation
jeffkl
reviewed
Sep 22, 2025
16701e8 to
a4bc21f
Compare
zivkan
previously approved these changes
Sep 23, 2025
This reverts commit a4bc21f.
1cbbe46 to
7bf783a
Compare
jeffkl
reviewed
Sep 23, 2025
jeffkl
approved these changes
Sep 23, 2025
Contributor
jeffkl
left a comment
There was a problem hiding this comment.
I don't like the quotation changes in the YAML but love the indentation fixes. We should do a follow-up PR to normalize the quotes
Contributor
Author
|
Thanks, Jeff. Filed NuGet/Home#14555! |
This was referenced Nov 6, 2025
3 tasks
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.
Bug
Fixes: https://github.com/NuGet/Client.Engineering/issues/3430
Description
Supersedes #6289
Fix path
Corrects the path so that the MicroBuild task no longer searches the root artifacts folder for an SBOM (which is both inefficient and has potential to find the wrong SBOM).
The key change is we need to look in the same subfolder as the generate-sbom templates do, specifically not just ManifestDirPath, but $(ManifestDirPath)\ $(ARTIFACT_NAME)
Previous search behavior
MSBuild Task
AddSBOMhad been searching the entire root artifacts folder for the SBOM.Corrected search behavior
MSBuild Task

AddSBOMnow finds the SBOM immediately without searching the entire root artifacts folder .Fail if not found
The Build now Fails when the SBOM file is not found. This prevents us from having to find out later when inserting into VS. An error is easier than piecing together what went wrong after-the-fact.
Example Failing build:
https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=12445368&view=results

Example Successful build:
https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=12445358&view=results
PR Checklist
Added testsSee example buildsLink to an issue or pull request to update docs if this PR changes settings, environment variables, new feature, etc.