Skip to content

[msbuild] Explain codesign failures caused by extended attributes. Fixes #5202 - #26910

Open
rolfbjarne wants to merge 1 commit into
mainfrom
dev/rolf/codesign-failure-diagnostics
Open

rolfbjarne wants to merge 1 commit into
mainfrom
dev/rolf/codesign-failure-diagnostics

Conversation

@rolfbjarne

Copy link
Copy Markdown
Member

Detect the resource fork/Finder information failure in Codesign and add a localized diagnostic for each affected bundle. Preserve the original error and explain how to locate offending files with xattr, clear attributes from the source files, and rebuild, with a link to Apple's troubleshooting documentation.

Only inspect codesign output after a failure; do not scan or modify file metadata during normal builds. Add regression coverage for multiple bundles, paths containing spaces, unrelated failures, successful signing, and stamp-file behavior.

Validation: all 7 CodesignTaskTests pass after rebasing onto main.

Fixes #5202

🤖 Pull request created by Copilot

Detect the resource fork/Finder information failure in Codesign and add a localized diagnostic for each affected bundle. Preserve the original error and explain how to locate offending files with xattr, clear attributes from the source files, and rebuild, with a link to Apple's troubleshooting documentation.

Only inspect codesign output after a failure; do not scan or modify file metadata during normal builds. Add regression coverage for multiple bundles, paths containing spaces, unrelated failures, successful signing, and stamp-file behavior.

Fixes #5202

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 6e358f10-7a38-45b3-8e9b-a64b1a0f4aa6
Copilot AI balanced review requested due to automatic review settings October 19, 2026 04:01
@rolfbjarne
rolfbjarne requested a review from dalexsoto as a code owner October 19, 2026 04:01

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Required CI results remain unverified despite the reported local test success.

1 open issue
What changed in this PR

Improves Codesign troubleshooting for extended-attribute failures, addressing #5202 without scanning or modifying file metadata.

Changes:

  • Adds a localized diagnostic while preserving the original error.
  • Explains how to locate affected files, remove source attributes, and rebuild.
  • Adds regression coverage for multiple bundles, spaces, failure types, successful signing, and stamp files.
File Description
tests/​msbuild/​Xamarin.MacDev.Tasks.Tests/​TaskTests/​CodesignTaskTests.cs Tests diagnostic and stamp-file behavior.
msbuild/​Xamarin.MacDev.Tasks/​Tasks/​Codesign.cs Detects the specific signing failure.
msbuild/​Xamarin.Localization.MSBuild/​MSBStrings.resx Adds troubleshooting guidance and an Apple documentation link.

Review effort: Balanced

Comment thread msbuild/Xamarin.Localization.MSBuild/MSBStrings.resx
@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

✅ API diff for current PR / commit

NET (empty diffs)

✅ API diff vs stable

NET (empty diffs)

ℹ️ Generator diff

Generator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes)

Pipeline on Agent
Hash: 8432834341b62f978408c232744ee88979545fb7 [PR build]

@vs-mobiletools-engineering-service2

This comment has been minimized.

1 similar comment
@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

🔥 [CI Build #8432834] Test results 🔥

Test results

❌ Tests failed on VSTS: test results

1 tests crashed, 0 tests failed, 218 tests passed.

Failures

❌ windows tests

🔥 Failed catastrophically on VSTS: test results - windows (no summary found).

Html Report (VSDrops) Download

Successes

✅ assembly-processing: All 1 tests passed. Html Report (VSDrops) Download
✅ cecil: All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (iOS): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (MacCatalyst): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (macOS): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (Multiple platforms): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (tvOS): All 1 tests passed. Html Report (VSDrops) Download
✅ framework: All 2 tests passed. Html Report (VSDrops) Download
✅ fsharp: All 4 tests passed. Html Report (VSDrops) Download
✅ generator: All 5 tests passed. Html Report (VSDrops) Download
✅ interdependent-binding-projects: All 4 tests passed. Html Report (VSDrops) Download
✅ introspection: All 4 tests passed. Html Report (VSDrops) Download
✅ linker (iOS): All 21 tests passed. Html Report (VSDrops) Download
✅ linker (MacCatalyst): All 21 tests passed. Html Report (VSDrops) Download
✅ linker (macOS): All 21 tests passed. Html Report (VSDrops) Download
✅ linker (tvOS): All 21 tests passed. Html Report (VSDrops) Download
✅ monotouch (iOS): All 20 tests passed. Html Report (VSDrops) Download
✅ monotouch (MacCatalyst): All 20 tests passed. Html Report (VSDrops) Download
✅ monotouch (macOS): All 20 tests passed. Html Report (VSDrops) Download
✅ monotouch (tvOS): All 20 tests passed. Html Report (VSDrops) Download
✅ msbuild: All 2 tests passed. Html Report (VSDrops) Download
✅ sharpie: All 1 tests passed. Html Report (VSDrops) Download
✅ xcframework: All 4 tests passed. Html Report (VSDrops) Download
✅ xtro: All 1 tests passed. Html Report (VSDrops) Download

macOS tests

✅ Tests on macOS Sonoma (14): All 5 tests passed. Html Report (VSDrops) Download
✅ Tests on macOS Sequoia (15): All 5 tests passed. Html Report (VSDrops) Download
✅ Tests on macOS Tahoe (26): All 5 tests passed. Html Report (VSDrops) Download
✅ Tests on macOS Golden Gate (27): All 5 tests passed. Html Report (VSDrops) Download

Linux Build Verification

✅ Linux build succeeded

Pipeline on Agent
Hash: 8432834341b62f978408c232744ee88979545fb7 [PR build]

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FinderInfo metadata can make builds unsignable

3 participants