Repository navigation
Exclude build intermediates from test packages - #28325
Merged
Justin Chung (jshigetomi) merged 1 commit intoNov 4, 2026
Merged
Justin Chung (jshigetomi) merged 1 commit into
Justin Chung (jshigetomi) merged 1 commit into
Conversation
…om test package ## Summary - Remove generated `obj` directories after publishing PowerShell test tools. - Preserve the published `bin` outputs required to run tests. - Prevent SDK-generated build intermediates from being copied into test-package archives. ## Reason The coordinated binaries build's Guardian CodeSign validation reported `CodeSign.MissingSigningCert` for `Microsoft.NET.Sdk.BlazorWeb.DotNetWatch.BrowserTools.Config.js` files inside the Windows test packages. Those files are generated by `Microsoft.NET.Sdk.Web` under test-tool `obj` directories and are not intended distribution artifacts. This cleanup is in `Publish-PSTestTools`, so it covers both `New-TestPackage` and `Compress-TestContent` consumers. Related build: https://dev.azure.com/mscodehub/PowerShellCore/_build/results?buildId=733320 ## Validation - `build.psm1` parses with no PowerShell parser errors. - `git diff --check` passes. - The change is limited to four lines in `build.psm1`. ---- #### AI description (iteration 1) #### PR Classification Build process cleanup: removes unnecessary build intermediates from test packages. #### PR Summary This PR updates `build.psm1` to remove `obj` directories from the test folder during test tool publishing, ensuring build intermediates are excluded from test packages. - `build.psm1`: Added logic to `Publish-PSTestTools` function to recursively find and delete `obj` directories under `$PSScriptRoot/test` before completing the test package publishing process. <!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot -->
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues were identified for the post-publish cleanup of generated test-tree obj directories.
No open issues 🎉
What changed in this PR
Exclude generated build intermediates from PowerShell test packages to address signing-validation failures caused by SDK-generated files.
Changes:
- Remove
objdirectories undertestafter publishing test tools and the custom connection module. - Leave published
binoutputs needed to run tests unchanged.
| File | Description |
|---|---|
build.psm1 |
Add post-publish cleanup of test-tree obj directories in Publish-PSTestTools. |
Review effort: Balanced
Aditya Patwardhan (adityapatwardhan)
approved these changes
Nov 4, 2026
Justin Chung (jshigetomi)
merged commit Nov 4, 2026
ab8b508
into
PowerShell:master
44 of 45 checks passed
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.
PR Summary
Exclude generated
objdirectories after publishing PowerShell test tools so SDK build intermediates are not copied into test-package archives. Publishedbinoutputs required to run tests remain unchanged.PR Context
This ports commit
a712d40678c02a6198d140de474a29b4a18d2845fromrelease/v7.7.0-rc.1tomaster.The coordinated binaries build's Guardian CodeSign validation reported
CodeSign.MissingSigningCertforMicrosoft.NET.Sdk.BlazorWeb.DotNetWatch.BrowserTools.Config.jsfiles inside Windows test packages. Those files are generated byMicrosoft.NET.Sdk.Webunder test-toolobjdirectories and are not intended distribution artifacts.Validation:
pwsh -NoLogo -NoProfile -Command '$parseErrors = $null; [void][System.Management.Automation.Language.Parser]::ParseFile((Resolve-Path ".\build.psm1"), [ref]$null, [ref]$parseErrors); if ($parseErrors.Count -gt 0) { $parseErrors | ForEach-Object { Write-Error $_.Message }; exit 1 }; "PASS: build.psm1 has no PowerShell parser errors."'git diff --check origin/master...HEADPR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright header