Skip to content

[msbuild] Add diagnostic logging for native reference resource resolution (#24564) - #26563

Merged
rolfbjarne merged 2 commits into
mainfrom
dev/rolf/issue-24564-diagnostics
Sep 10, 2026
Merged

rolfbjarne merged 2 commits into
mainfrom
dev/rolf/issue-24564-diagnostics

Conversation

@rolfbjarne

@rolfbjarne rolfbjarne commented Sep 4, 2026

Copy link
Copy Markdown
Member

Add low-importance diagnostic logging to help investigate #24564, where a Firebase.Crashlytics.resources.zip is not copied to the Mac during Pair-to-Mac builds:

  • ResolveNativeReferences.GetAdditionalItemsToBeCopied(): log which branch (resources directory vs resources zip vs neither) is taken for each reference, including the exact paths checked.
  • CompareFilesMessageHandler (Mac-side messaging handler): trace whether each file is missing, has a mismatched hash, or already matches on the Mac, to help diagnose why a file may not get copied over.

…tion (#24564)

Add low-importance diagnostic logging to help investigate #24564, where
a Firebase.Crashlytics.resources.zip is not copied to the Mac during
Pair-to-Mac builds:

* ResolveNativeReferences.GetAdditionalItemsToBeCopied(): log which
  branch (resources directory vs resources zip vs neither) is taken
  for each reference, including the exact paths checked.
* Xamarin.Shared.targets: log the ReferencePath and
  _ReferencesWithNativeReferencesToExpand item groups computed in
  _ExpandNativeReferences, to verify whether a given assembly (e.g.
  Firebase.Crashlytics.dll) is included.
* CompareFilesMessageHandler (Mac-side messaging handler): trace
  whether each file is missing, has a mismatched hash, or already
  matches on the Mac, to help diagnose why a file may not get copied
  over.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI lite review requested due to automatic review settings September 4, 2026 08:16
@rolfbjarne
rolfbjarne requested a review from mauroa as a code owner September 4, 2026 08:16

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.

🟡 Changes recommended

It introduces avoidable extra allocations in a build-path hot spot and the PR description currently claims additional file changes that are not present in the diff.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR adds extra diagnostic logging to help investigate Pair-to-Mac native-reference/resource copy behavior (notably around .resources directories / .resources.zip files and Mac-side file compare decisions).

Changes:

  • Added low-importance MSBuild task logging in ResolveNativeReferences.GetAdditionalItemsToBeCopied() to indicate whether a .resources directory or .resources.zip was found (or neither).
  • Added Mac-side tracing in CompareFilesMessageHandler to report whether each file is missing, hash-mismatched, or already matches.
File summaries
File Description
msbuild/Xamarin.MacDev.Tasks/Tasks/ResolveNativeReferences.cs Adds diagnostic messages for which resource package path is detected per reference.
msbuild/Messaging/Xamarin.Messaging.Build/Handlers/CompareFilesMessageHandler.cs Adds per-item tracing for missing/mismatch/match outcomes during Mac-side compare.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 3
  • Review effort level: Lite

Comment thread msbuild/Xamarin.MacDev.Tasks/Tasks/ResolveNativeReferences.cs
Comment thread msbuild/Xamarin.MacDev.Tasks/Tasks/ResolveNativeReferences.cs
@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@rolfbjarne
rolfbjarne enabled auto-merge (squash) September 4, 2026 14:01
@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: 19fe49b8d76db1debd596f3b3b0ef41a01118971 [PR build]

@vs-mobiletools-engineering-service2

This comment has been minimized.

@rolfbjarne rolfbjarne added the ready-to-review This PR is ready to review/merge. label Sep 7, 2026
@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

🚀 [CI Build #19fe49b] Test results 🚀

Test results

✅ All tests passed on VSTS: test results.

🎉 All 264 tests passed 🎉

Tests counts

✅ 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 7 tests passed. Html Report (VSDrops) Download
✅ linker (iOS): All 31 tests passed. Html Report (VSDrops) Download
✅ linker (MacCatalyst): All 31 tests passed. [attempt 2] Html Report (VSDrops) Download
✅ linker (macOS): All 21 tests passed. Html Report (VSDrops) Download
✅ linker (tvOS): All 31 tests passed. Html Report (VSDrops) Download
✅ monotouch (iOS): All 25 tests passed. Html Report (VSDrops) Download
✅ monotouch (MacCatalyst): All 25 tests passed. Html Report (VSDrops) Download
✅ monotouch (macOS): All 20 tests passed. Html Report (VSDrops) Download
✅ monotouch (tvOS): All 25 tests passed. Html Report (VSDrops) Download
✅ msbuild: All 2 tests passed. Html Report (VSDrops) Download
✅ sharpie: All 1 tests passed. Html Report (VSDrops) Download
✅ windows: All 3 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

Linux Build Verification

Linux build succeeded

Pipeline on Agent
Hash: 19fe49b8d76db1debd596f3b3b0ef41a01118971 [PR build]

@rolfbjarne
rolfbjarne merged commit 9962c42 into main Sep 10, 2026
54 checks passed
@rolfbjarne
rolfbjarne deleted the dev/rolf/issue-24564-diagnostics branch September 10, 2026 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

copilot ready-to-review This PR is ready to review/merge.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants