[msbuild] Disable device-specific builds by default.#26005
Conversation
Device-specific builds are no longer useful since arm64 is the only architecture, and the extra path segments cause MAX_PATH issues on Windows. Changes: - Default DeviceSpecificBuild to false (was tied to _BundlerDebug). - Don't run ParseDeviceSpecificBuildInformation on .NET 10+, unless the private _DeviceSpecificBuildOverride property is set to true. This completely disables device-specific builds (unless the override is specified, which will hopefully never be necessary, and then we can remove the code in .NET 12). Contributes towards #23846. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This comment has been minimized.
This comment has been minimized.
🔥 [PR Build #85b511b] Build failed (Detect API changes) 🔥Build failed for the job 'Detect API changes' (with job status 'Failed') Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Pull request overview
This PR simplifies the .NET Apple MSBuild pipeline by disabling device-specific builds by default (to reduce complexity and shorten bin/obj paths), while keeping an escape hatch for .NET 11+ via a private override property.
Changes:
- Default
DeviceSpecificBuildtofalseinstead of tying it to_BundlerDebug. - Skip
ParseDeviceSpecificBuildInformationfor .NET 11+ unless_DeviceSpecificBuildOverrideis explicitly set totrue.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| msbuild/Xamarin.Shared/Xamarin.Shared.targets | Adds a .NET-version gate (with an override) to stop running the device-specific build parsing task for .NET 11+. |
| msbuild/Xamarin.Shared/Xamarin.iOS.Common.props | Changes the default value of DeviceSpecificBuild to false. |
…eSpecificBuild=true Since the default is now false, the test must explicitly opt-in to device-specific builds for the test to exercise that code path. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This comment has been minimized.
This comment has been minimized.
✅ API diff for current PR / commitNET (empty diffs)✅ API diff vs stableNET (empty diffs)ℹ️ Generator diffGenerator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes) Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
🚀 [CI Build #22b4fb4] Test results 🚀Test results✅ All tests passed on VSTS: test results. 🎉 All 199 tests passed 🎉 Tests counts✅ assembly-processing: All 1 tests passed. Html Report (VSDrops) Download macOS tests✅ Tests on macOS Monterey (12): All 5 tests passed. Html Report (VSDrops) Download Linux Build VerificationPipeline on Agent |
Device-specific builds were originally implemented to:
However, the first reason is no longer applicable (arm64 is the only architecture), and the feature adds complexity and increases path lengths in the bin directory (which causes MAX_PATH issues on Windows).
Changes:
DeviceSpecificBuildtofalse(was tied to_BundlerDebug)._DeviceSpecificBuildOverrideproperty is set to true. This completely disables device-specific builds (unless the override is specified, which will hopefully never be necessary, and then we can remove the code in .NET 12).Contributes towards #23846
🤖 Pull request created by Copilot