Skip to content

[msbuild] Read artifact metadata locally on Windows. Fixes #26847 - #26904

Open
rolfbjarne wants to merge 1 commit into
mainfrom
dev/rolf/issue-26847-diagnosis
Open

rolfbjarne wants to merge 1 commit into
mainfrom
dev/rolf/issue-26847-diagnosis

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

WriteAppManifest already downloads the final merged bundle manifest to Windows. Read this local file without a build session so artifact metadata collection no longer tries to execute remotely after Build has disconnected from the paired Mac. Require the local manifest to exist and skip unused minimum OS version conversion.

Add RemoteWindows coverage for GetApplicationArtifacts and Publish, with archiving enabled and disabled. Verify metadata from a custom final manifest, including the bundle-name fallback. Disable the independent publish-time dSYM copy in these cases to isolate this regression. Existing remote IPA/archive coverage only invoked Build, while metadata and Publish tests were not selected by the remote Windows category filter.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@rolfbjarne
rolfbjarne requested a review from dalexsoto as a code owner October 16, 2026 18:41
Copilot AI balanced review requested due to automatic review settings October 16, 2026 18: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.

🔵 Needs a closer look

No concrete defects were identified, but paired Windows/Mac regression validation remains pending in CI.

0 open findings

What changed in this PR

Fixes remote Windows artifact metadata collection by reading the downloaded application manifest locally after the Mac build disconnects.

Changes:

  • Removes remote execution from metadata reading and requires a local manifest.
  • Disables unused minimum OS version conversion.
  • Adds four remote Windows regression cases covering artifact collection and publishing, with and without archiving.
File Description
tests/​dotnet/​UnitTests/​PostBuildTest.cs Adds remote Windows manifest and artifact metadata checks.
msbuild/​Xamarin.Shared/​Xamarin.Shared.targets Reads artifact metadata locally without Mac SDK conversion.

🧠 Review effort: Balanced

@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: 3b9d410e4c6519ab95b2738f93902ecda85a239d [PR build]

@vs-mobiletools-engineering-service2

This comment has been minimized.

@rolfbjarne rolfbjarne added backport-to-net11.0 Add this to issues or pull requests that should be backported to .NET 11 backport-to-net10.0 Add this to issues or pull requests that should be backported to .NET 10 labels Oct 19, 2026
@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

🔥 [CI Build #3b9d410] Test results 🔥

Test results

❌ Tests failed on VSTS: test results

1 tests crashed, 1 tests failed, 217 tests passed.

Failures

❌ dotnettests tests (macOS) [attempt 2]

1 tests failed, 0 tests passed.

Failed tests

  • DotNet tests: Failed (Execution failed with exit code 1)
    • Xamarin.Tests.DotNetProjectTest.AppWithLibraryWithResourcesRefer...: '/Users/cloudtest/vss/_work/1/s/macios/tests/dotnet/AppWithLibraryWithResourcesReference/macOS/bin/DebugOriginal/net11.0-macos/o...

Html Report (VSDrops) Download

❌ 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 (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: 3b9d410e4c6519ab95b2738f93902ecda85a239d [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

backport-to-net10.0 Add this to issues or pull requests that should be backported to .NET 10 backport-to-net11.0 Add this to issues or pull requests that should be backported to .NET 11 copilot

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[msbuild] Remote build from Windows fails in ReadAppManifest with ArgumentNullException (path2) on 27.0.10722

3 participants