Skip to content

[release/10.0.1xx] [msbuild] Read artifact metadata locally on Windows. Fixes #26847 - #27048

Merged
rolfbjarne merged 3 commits into
release/10.0.1xxfrom
dev/rolf/backport-pr-26904-release/10.0.1xx-2026-10-27
Oct 28, 2026
Merged

rolfbjarne merged 3 commits into
release/10.0.1xxfrom
dev/rolf/backport-pr-26904-release/10.0.1xx-2026-10-27

Conversation

@rolfbjarne

Copy link
Copy Markdown
Member

Remote Windows publishing collects application artifact metadata after Build has disconnected from the paired Mac. Passing the build session to ReadAppManifest then attempts another remote task without an associated application, causing the reported ArgumentNullException for path2.

WriteAppManifest already downloads the final merged bundle manifest to Windows. Read that local file without a remote session, require it to exist, and disable the unused minimum OS version conversion so metadata collection does not need the Mac SDK.

Add four RemoteWindows regression cases covering GetApplicationArtifacts and Publish, with archiving enabled and disabled. They verify final-manifest availability and custom application metadata, including the bundle-name fallback. Existing remote IPA/archive coverage only invoked Build; the metadata and publish tests were not selected by the remote Windows category filter.

The tests disable the independent publish-time dSYM copy to isolate this fix. That connection-ordering issue is being addressed separately. A .NET 10 backport also needs the explicit manifest download from commit b44b2f9698.

Fixes #26847

🤖 Pull request created by Copilot


Co-authored-by: Copilot App 223556219+Copilot@users.noreply.github.com

Backport of #26904.

rolfbjarne and others added 2 commits October 27, 2026 08:41
…6904)

Remote Windows publishing collects application artifact metadata after `Build` has disconnected from the paired Mac. Passing the build session to `ReadAppManifest` then attempts another remote task without an associated application, causing the reported `ArgumentNullException` for `path2`.

`WriteAppManifest` already downloads the final merged bundle manifest to Windows. Read that local file without a remote session, require it to exist, and disable the unused minimum OS version conversion so metadata collection does not need the Mac SDK.

Add four `RemoteWindows` regression cases covering `GetApplicationArtifacts` and `Publish`, with archiving enabled and disabled. They verify final-manifest availability and custom application metadata, including the bundle-name fallback. Existing remote IPA/archive coverage only invoked `Build`; the metadata and publish tests were not selected by the remote Windows category filter.

The tests disable the independent publish-time dSYM copy to isolate this fix. That connection-ordering issue is being addressed separately. A .NET 10 backport also needs the explicit manifest download from commit `b44b2f9698`.

Fixes #26847

🤖 Pull request created by Copilot

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@rolfbjarne rolfbjarne added backported ready-to-review This PR is ready to review/merge. labels Oct 27, 2026
Copilot AI balanced review requested due to automatic review settings October 27, 2026 07:41

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

The backport passes an unsupported DisableMinimumOSVersion task parameter, causing MSBuild to reject artifact metadata collection.

1 open issue
What changed in this PR

This backport addresses remote Windows publishing failures from #26847 by reading application artifact metadata locally after the paired Mac disconnects.

Changes:

  • Downloads the final bundle manifest to Windows and supports single-item calls to the copy helper.
  • Changes artifact metadata collection to read the local manifest without a remote session.
  • Adds four remote Windows regression cases covering artifact collection and publishing, with archiving enabled and disabled.
File Description
tests/​dotnet/​UnitTests/​PostBuildTest.cs Adds remote Windows manifest and artifact metadata checks.
msbuild/​Xamarin.Shared/​Xamarin.Shared.targets Switches metadata reads to the local manifest and requests skipping minimum OS processing.
msbuild/​Xamarin.MacDev.Tasks/​Tasks/​XamarinTask.cs Allows individual items in file-copy helper calls.
msbuild/​Xamarin.MacDev.Tasks/​Tasks/​WriteAppManifest.cs Downloads the final manifest after successful remote execution.

Review effort: Balanced

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

dalexsoto
dalexsoto previously approved these changes Oct 27, 2026
Backport the DisableMinimumOSVersion property from commit 5cc77af
so _AddAppleApplicationArtifactMetadata can disable minimum OS version
conversion on release/10.0.1xx.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings October 27, 2026 22:49
@rolfbjarne
rolfbjarne enabled auto-merge (squash) October 27, 2026 22:52

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

All four new RemoteWindows cases need validation on paired Windows/Mac machines because the external messaging client’s post-disconnection transfer behavior cannot be verified from the source snapshot.

No open issues 🎉

1 previously missed issue

In code that hasn't changed since last review

Medium severity Validate AppBundleManifest before use instead of suppressing nullability

msbuild/​Xamarin.MacDev.Tasks/​Tasks/​WriteAppManifest.cs:30

⚠️ The new AppBundleManifest! suppresses nullability instead of validating the task input, contrary to the entry-point null-check convention in .github/copilot-instructions.md:182-186. Check AppBundleManifest at the start of Execute and pass it to the copy helper without the null-forgiving operator.

1 resolved since last review

Review effort: Balanced

@vs-mobiletools-engineering-service2

This comment has been minimized.

@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: 693e2e999bee615ad7f45e463a9c35cccb3728a2 [PR build]

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

🚀 [CI Build #693e2e9] Test results 🚀

Test results

✅ All tests passed on VSTS: test results.

🎉 All 200 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 4 tests passed. Html Report (VSDrops) Download
✅ linker (iOS): All 15 tests passed. Html Report (VSDrops) Download
✅ linker (MacCatalyst): All 15 tests passed. Html Report (VSDrops) Download
✅ linker (macOS): All 21 tests passed. Html Report (VSDrops) Download
✅ linker (tvOS): All 15 tests passed. Html Report (VSDrops) Download
✅ monotouch (iOS): All 19 tests passed. Html Report (VSDrops) Download
✅ monotouch (MacCatalyst): All 18 tests passed. Html Report (VSDrops) Download
✅ monotouch (macOS): All 21 tests passed. Html Report (VSDrops) Download
✅ monotouch (tvOS): All 19 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
✅ Tests on macOS Golden Gate (27): All 5 tests passed. Html Report (VSDrops) Download

Linux Build Verification

✅ Linux build succeeded

Pipeline on Agent
Hash: 693e2e999bee615ad7f45e463a9c35cccb3728a2 [PR build]

@rolfbjarne
rolfbjarne merged commit 357f0ca into release/10.0.1xx Oct 28, 2026
62 checks passed
@rolfbjarne
rolfbjarne deleted the dev/rolf/backport-pr-26904-release/10.0.1xx-2026-10-27 branch October 28, 2026 01:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants