Skip to content

[msbuild] Automatically set DEVELOPER_DIR for all child processes.#24541

Merged
rolfbjarne merged 1 commit intomainfrom
dev/rolf/msbuild-developer-dir
Jan 22, 2026
Merged

[msbuild] Automatically set DEVELOPER_DIR for all child processes.#24541
rolfbjarne merged 1 commit intomainfrom
dev/rolf/msbuild-developer-dir

Conversation

@rolfbjarne
Copy link
Copy Markdown
Member

At least for all tasks that sets the SdkDevPath (a future pull request will
ensure that all tasks set SdkDevPath).

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 pull request refactors the MSBuild task system to automatically set the DEVELOPER_DIR environment variable for all child processes. Instead of requiring each task to explicitly pass the SDK developer path when executing external tools, the functionality is now centralized in the XamarinTask base class.

Changes:

  • Modified XamarinTask.ExecuteAsync to automatically use the SdkDevPath property when calling external processes
  • Removed explicit sdkDevPath parameters from all task ExecuteAsync calls across 24 task files
  • Changed the static ExecuteAsync method visibility from internal protected to private, improving encapsulation

Reviewed changes

Copilot reviewed 24 out of 24 changed files in this pull request and generated no comments.

Show a summary per file
File Description
msbuild/Xamarin.MacDev.Tasks/Tasks/XamarinTask.cs Core implementation - instance method now automatically passes SdkDevPath to static method; static method visibility reduced to private
msbuild/Xamarin.MacDev.Tasks/Tasks/XcodeCompilerToolTask.cs Removed manual DEVELOPER_DIR environment setup and sdkDevPath parameter from ExecuteAsync call
msbuild/Xamarin.MacDev.Tasks/Tasks/XcodeBuildTask.cs Removed sdkDevPath parameter from xcrun execution
msbuild/Xamarin.MacDev.Tasks/Tasks/SpotlightIndexer.cs Switched from static to instance ExecuteAsync method call
msbuild/Xamarin.MacDev.Tasks/Tasks/ScnTool.cs Removed sdkDevPath parameter from xcrun execution
msbuild/Xamarin.MacDev.Tasks/Tasks/OptimizePropertyList.cs Switched from static to instance ExecuteAsync method call
msbuild/Xamarin.MacDev.Tasks/Tasks/OptimizeImage.cs Switched from static to instance ExecuteAsync method call and removed sdkDevPath parameter
msbuild/Xamarin.MacDev.Tasks/Tasks/MetalLib.cs Switched from static to instance ExecuteAsync method call
msbuild/Xamarin.MacDev.Tasks/Tasks/Metal.cs Switched from static to instance ExecuteAsync method call
msbuild/Xamarin.MacDev.Tasks/Tasks/MergeAppBundles.cs Removed sdkDevPath parameter from lipo execution
msbuild/Xamarin.MacDev.Tasks/Tasks/LinkNativeCode.cs Removed sdkDevPath parameter from xcrun executions
msbuild/Xamarin.MacDev.Tasks/Tasks/InstallNameTool.cs Removed sdkDevPath parameter from xcrun execution
msbuild/Xamarin.MacDev.Tasks/Tasks/GetMlaunchArguments.cs Removed sdkDevPath parameter from mlaunch executions
msbuild/Xamarin.MacDev.Tasks/Tasks/Ditto.cs Switched from static to instance ExecuteAsync method call
msbuild/Xamarin.MacDev.Tasks/Tasks/DSymUtil.cs Removed sdkDevPath parameter from xcrun execution
msbuild/Xamarin.MacDev.Tasks/Tasks/CreateInstallerPackage.cs Switched from static to instance ExecuteAsync method call
msbuild/Xamarin.MacDev.Tasks/Tasks/CreateAssetPack.cs Switched from static to instance ExecuteAsync method call
msbuild/Xamarin.MacDev.Tasks/Tasks/CoreMLCompiler.cs Removed sdkDevPath parameter from coremlc execution
msbuild/Xamarin.MacDev.Tasks/Tasks/CompileSceneKitAssets.cs Removed sdkDevPath parameter and unnecessary blank line
msbuild/Xamarin.MacDev.Tasks/Tasks/CompileNativeCode.cs Removed sdkDevPath parameter from xcrun execution
msbuild/Xamarin.MacDev.Tasks/Tasks/Codesign.cs Removed null sdkDevPath parameter from codesign execution
msbuild/Xamarin.MacDev.Tasks/Tasks/BGen.cs Switched from static to instance ExecuteAsync method call
msbuild/Xamarin.MacDev.Tasks/Tasks/AlTool.cs Switched from static to instance ExecuteAsync method call and removed sdkDevPath parameter
msbuild/Xamarin.MacDev.Tasks/Tasks/AOTCompile.cs Removed sdkDevPath parameter from AOT compiler execution

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

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

Pipeline on Agent
Hash: 5269892f03804df91cbe2a36b17092970af2f879 [PR build]

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

✅ [CI Build #5269892] Build passed (Build packages) ✅

Pipeline on Agent
Hash: 5269892f03804df91cbe2a36b17092970af2f879 [PR build]

@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: 5269892f03804df91cbe2a36b17092970af2f879 [PR build]

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

✅ [CI Build #5269892] Build passed (Build macOS tests) ✅

Pipeline on Agent
Hash: 5269892f03804df91cbe2a36b17092970af2f879 [PR build]

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

💻 [CI Build #5269892] Tests on macOS X64 - Mac Sonoma (14) passed 💻

All tests on macOS X64 - Mac Sonoma (14) passed.

Pipeline on Agent
Hash: 5269892f03804df91cbe2a36b17092970af2f879 [PR build]

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

💻 [CI Build #5269892] Tests on macOS M1 - Mac Monterey (12) passed 💻

All tests on macOS M1 - Mac Monterey (12) passed.

Pipeline on Agent
Hash: 5269892f03804df91cbe2a36b17092970af2f879 [PR build]

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

💻 [CI Build #5269892] Tests on macOS M1 - Mac Ventura (13) passed 💻

All tests on macOS M1 - Mac Ventura (13) passed.

Pipeline on Agent
Hash: 5269892f03804df91cbe2a36b17092970af2f879 [PR build]

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

💻 [CI Build #5269892] Tests on macOS arm64 - Mac Sequoia (15) passed 💻

All tests on macOS arm64 - Mac Sequoia (15) passed.

Pipeline on Agent
Hash: 5269892f03804df91cbe2a36b17092970af2f879 [PR build]

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

💻 [CI Build #5269892] Tests on macOS arm64 - Mac Tahoe (26) passed 💻

All tests on macOS arm64 - Mac Tahoe (26) passed.

Pipeline on Agent
Hash: 5269892f03804df91cbe2a36b17092970af2f879 [PR build]

@vs-mobiletools-engineering-service2

This comment has been minimized.

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

🚀 [CI Build #5269892] 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
✅ dotnettests (iOS): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (MacCatalyst): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (macOS): 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 6 tests passed. Html Report (VSDrops) Download
✅ linker: All 44 tests passed. Html Report (VSDrops) Download
✅ monotouch (iOS): All 9 tests passed. [attempt 2] Html Report (VSDrops) Download
✅ monotouch (MacCatalyst): All 11 tests passed. Html Report (VSDrops) Download
✅ monotouch (macOS): All 12 tests passed. Html Report (VSDrops) Download
✅ monotouch (tvOS): All 9 tests passed. Html Report (VSDrops) Download
✅ msbuild: All 2 tests passed. Html Report (VSDrops) Download
✅ windows: All 3 tests passed. Html Report (VSDrops) Download
✅ xcframework: All 4 tests passed. Html Report (VSDrops) Download
✅ xtro: All 1 tests passed. Html Report (VSDrops) Download

Pipeline on Agent
Hash: 5269892f03804df91cbe2a36b17092970af2f879 [PR build]

@rolfbjarne rolfbjarne merged commit c6fec41 into main Jan 22, 2026
50 of 51 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