Skip to content

Fix CodeSign.MissingSigningCert for xsd/Update-MSBuildXsds.ps1#13320

Merged
rainersigwald merged 2 commits intomainfrom
fix/codesign-xsd-ps1
Mar 3, 2026
Merged

Fix CodeSign.MissingSigningCert for xsd/Update-MSBuildXsds.ps1#13320
rainersigwald merged 2 commits intomainfrom
fix/codesign-xsd-ps1

Conversation

@JanProvaznik
Copy link
Member

Summary

PR #13175 accidentally replaced the ItemsToSign Include for Update-MSBuildXsds.ps1 with a conditional Remove, meaning the file was never added to signing. CodeSignValidation then flagged it as unsigned (CodeSign.MissingSigningCert).

Change

Restore the original unconditional Include in eng/Signing.props. The broken Remove (which was removing an item that was never added) is deleted.

Why this is safe

  • MSBuild official build (Windows): The CopyXsds target produces the file in artifacts\xsd. The Include ensures it gets signed. This is consumed by VS insertion via CustomScriptExecutionCommand in vs-insertion.yml.
  • Source-build (Linux, dotnet/dotnet): Signing is test/disabled, so the Include is harmless.
  • dotnet official build (Windows): Does not run CodeSignValidation on component-level artifacts.

Fixes AB#2787495

Copilot AI review requested due to automatic review settings March 3, 2026 15:35
@JanProvaznik JanProvaznik requested a review from a team as a code owner March 3, 2026 15:35
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Restores signing coverage for the Update-MSBuildXsds.ps1 script by re-adding it to the ItemsToSign list, fixing CodeSign.MissingSigningCert caused by an earlier change that removed it instead of including it.

Changes:

  • Replace a conditional ItemsToSign Remove with an unconditional ItemsToSign Include for artifacts\xsd\Update-MSBuildXsds.ps1.
  • Remove the now-incorrect comment implying the item should be excluded on non-Windows environments.

PR #13175 accidentally replaced the ItemsToSign Include for
Update-MSBuildXsds.ps1 with a Remove (which was a no-op since
the file was never included by default). This caused
CodeSignValidation to flag the file as unsigned.

Restore the Include with an Exists() guard so that signing works
in the MSBuild official build (where CopyXsds produces the file)
and doesn't break in contexts where the file may not exist.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@JanProvaznik JanProvaznik force-pushed the fix/codesign-xsd-ps1 branch from 12c5ded to ddaceef Compare March 3, 2026 16:51
Co-authored-by: Rainer Sigwald <raines@microsoft.com>
@rainersigwald
Copy link
Member

Filed #13323 for the flaky test failure and forcing the merge.

@rainersigwald rainersigwald disabled auto-merge March 3, 2026 19:02
@rainersigwald rainersigwald merged commit 3477e49 into main Mar 3, 2026
7 of 9 checks passed
@rainersigwald rainersigwald deleted the fix/codesign-xsd-ps1 branch March 3, 2026 19:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants