Skip to content

[msbuild] Copy some ILLink output back to Windows when building remotely.#25235

Merged
dalexsoto merged 3 commits intomainfrom
dev/rolf/msbuild-copy-to-windows
Apr 23, 2026
Merged

[msbuild] Copy some ILLink output back to Windows when building remotely.#25235
dalexsoto merged 3 commits intomainfrom
dev/rolf/msbuild-copy-to-windows

Conversation

@rolfbjarne
Copy link
Copy Markdown
Member

This is needed when building iOS apps using CoreCLR or NativeAOT remotely (in
the .NET 11 branch), and I'm adding these changes into main to ease upcoming
changes to these files in main.

No tests here, but the net11.0 branch already contains tests that will verify this.

Ref: #24521

…ely. (#24521)

This is needed when building iOS apps using CoreCLR remotely (in the .NET 11 branch),
and I'm adding these changes into main to ease upcoming changes to these files in main.

Ref: #24521
…re native source code.

This fixes an issue introduced recently where we're generating
apply-preserve-attribute.xml on the remote Mac, but we need the contents on
Windows for the NativeAOT compiler.
Copy link
Copy Markdown
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

This PR updates the Windows-remote build pipeline for iOS so that selected ILLink outputs produced on the remote Mac are copied back to Windows, enabling subsequent Windows-side steps (notably for CoreCLR/NativeAOT scenarios).

Changes:

  • Adds a new CopyToWindows switch to the Xamarin.MacDev.Tasks.ILLink task and wires it up from the Windows remote targets when UseMonoRuntime=false.
  • Introduces helper plumbing in XamarinTask to support copying files back to Windows using a TaskRunner instance from remote execution.
  • Updates ILLink’s remote-execution behavior to download linked outputs (and some linker cache outputs) to Windows after remote completion.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
msbuild/Xamarin.iOS.Tasks.Windows/Xamarin.iOS.Common.After.targets Enables ILLink output copying back to Windows for non-Mono runtime builds by setting/passing CopyToWindows.
msbuild/Xamarin.MacDev.Tasks/Tasks/XamarinTask.cs Adds a static helper overload to copy files back to Windows given an explicit MSBuild Task instance.
msbuild/Xamarin.MacDev.Tasks/Tasks/ILLink.cs Implements CopyToWindows behavior for remote ILLink execution and adjusts output-file placeholder creation logic accordingly.

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

This comment has been minimized.

@vs-mobiletools-engineering-service2
Copy link
Copy Markdown
Collaborator

✅ [PR Build #c202a58] Build passed (Detect API changes) ✅

Pipeline on Agent
Hash: c202a583cf97602c1246127fee50e357ee02b25b [PR build]

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@rolfbjarne rolfbjarne enabled auto-merge (squash) April 23, 2026 17:01
@vs-mobiletools-engineering-service2

This comment has been minimized.

@dalexsoto dalexsoto disabled auto-merge April 23, 2026 20:42
@dalexsoto dalexsoto merged commit a144156 into main Apr 23, 2026
10 checks passed
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.

5 participants