[msbuild] Fix XcodeProject output path when using artifacts folder#24224
[msbuild] Fix XcodeProject output path when using artifacts folder#24224rolfbjarne merged 4 commits intomainfrom
Conversation
Co-authored-by: mattleibow <1096616+mattleibow@users.noreply.github.com>
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Co-authored-by: rolfbjarne <249268+rolfbjarne@users.noreply.github.com>
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Co-authored-by: rolfbjarne <249268+rolfbjarne@users.noreply.github.com>
✅ [CI Build #bcefb10] Build passed (Build packages) ✅Pipeline on Agent |
✅ [PR Build #bcefb10] Build passed (Detect API changes) ✅Pipeline on Agent |
✅ [CI Build #bcefb10] Build passed (Build macOS tests) ✅Pipeline on Agent |
💻 [CI Build #bcefb10] Tests on macOS M1 - Mac Monterey (12) passed 💻✅ All tests on macOS M1 - Mac Monterey (12) passed. Pipeline on Agent |
💻 [CI Build #bcefb10] Tests on macOS X64 - Mac Sonoma (14) passed 💻✅ All tests on macOS X64 - Mac Sonoma (14) passed. Pipeline on Agent |
💻 [CI Build #bcefb10] Tests on macOS M1 - Mac Ventura (13) passed 💻✅ All tests on macOS M1 - Mac Ventura (13) passed. Pipeline on Agent |
💻 [CI Build #bcefb10] Tests on macOS arm64 - Mac Sequoia (15) passed 💻✅ All tests on macOS arm64 - Mac Sequoia (15) passed. Pipeline on Agent |
💻 [CI Build #bcefb10] Tests on macOS arm64 - Mac Tahoe (26) passed 💻✅ All tests on macOS arm64 - Mac Tahoe (26) passed. Pipeline on Agent |
✅ 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 |
🚀 [CI Build #bcefb10] Test results 🚀Test results✅ All tests passed on VSTS: test results. 🎉 All 122 tests passed 🎉 Tests counts✅ cecil: All 1 tests passed. Html Report (VSDrops) Download Pipeline on Agent |
When
UseArtifactsOutputis enabled,$(IntermediateOutputPath)is absolute. Prepending$(MSBuildProjectDirectory)creates invalid nested paths like:Changes
$(MSBuildProjectDirectory)/prefix from_XcodeProjectDefaultOutputPathRootinMicrosoft.MaciOS.Sdk.Xcode.targetsto prevent path concatenation issues whenIntermediateOutputPathis absoluteCreateXcArchive.csto callPath.GetFullPath()onOutputPath,DerivedDataPath, andPackageCachePathbefore using them in xcodebuild commandsCreateXcFramework.csto callPath.GetFullPath()onXcArchivePathandOutputPathbefore using them in xcodebuild commandsThis dual approach ensures that:
Path.GetFullPath()resolves them correctly relative to the current directoryPath.GetFullPath()returns them unchangedFixes #24222
Original prompt
<XcodeProject>and artifacts folder fails #24222💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.