-
Notifications
You must be signed in to change notification settings - Fork 548
Fix XcodeProject output path when using artifacts folder #24224
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: mattleibow <[email protected]>
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.
|
|
||
| <PropertyGroup> | ||
| <_XcodeProjectDefaultOutputPathRoot>$(MSBuildProjectDirectory)/$(IntermediateOutputPath)xcode/</_XcodeProjectDefaultOutputPathRoot> | ||
| <_XcodeProjectDefaultOutputPathRoot>$(IntermediateOutputPath)xcode/</_XcodeProjectDefaultOutputPathRoot> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot change the tasks that use this property to make it a full path before using the value (in the task's C# code).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. Modified CreateXcArchive.cs and CreateXcFramework.cs to call Path.GetFullPath() on the paths before using them. The targets file has been reverted to keep $(MSBuildProjectDirectory). Commit: ad5a54f
Co-authored-by: rolfbjarne <[email protected]>
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.
|
|
||
| <PropertyGroup> | ||
| <_XcodeProjectDefaultOutputPathRoot>$(IntermediateOutputPath)xcode/</_XcodeProjectDefaultOutputPathRoot> | ||
| <_XcodeProjectDefaultOutputPathRoot>$(MSBuildProjectDirectory)/$(IntermediateOutputPath)xcode/</_XcodeProjectDefaultOutputPathRoot> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot this change is still needed, please put it back
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. Restored the removal of $(MSBuildProjectDirectory)/ prefix from the targets file while keeping the Path.GetFullPath() calls in the C# tasks. Both changes are now in place. Commit: bcefb10
Co-authored-by: rolfbjarne <[email protected]>
✅ [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.