Skip to content

Conversation

mauroa
Copy link
Contributor

@mauroa mauroa commented Aug 25, 2025

We were setting a custom home folder (.home directory defined in the DOTNET_CUSTOM_HOME env var) when the dotnet SDK was installed by Pair To Mac, to encapsulate caches and to not mix them with the global dotnet installation: https://github.com/dotnet/macios/blob/main/msbuild/Messaging/Xamarin.Messaging.Build/TaskRunner.cs#L62C4-L66C6

If the user assigns the global dotnet installation to the "_DotNetRootRemoteDirectory" MSBuild property, the Build agent will end up overriding the HOME folder with a custom home that doesn't exist (there's no .home folder in the user profile in the Mac (where dotnet installs the global caches).

This issue has been revealed from the recent changes that allows the MSBuild client to bypass the "_DotNetRootRemoteDirectory" property to the Build Agent: https://dev.azure.com/devdiv/DevDiv/_git/ClientTools.Platform/pullrequest/663026

The fix consists of setting the custom home only if the dotnet SDK path to use is not the global one

@mauroa mauroa requested a review from dalexsoto August 25, 2025 15:54
@mauroa mauroa requested review from emaf and rolfbjarne as code owners August 25, 2025 15:54
@mauroa mauroa added the not-notes-worthy Ignore for release notes label Aug 25, 2025
@vs-mobiletools-engineering-service2

This comment has been minimized.

We were setting a custom home folder (.home directory defined in the DOTNET_CUSTOM_HOME env var) when the dotnet SDK was installed by Pair To Mac, to encapsulate caches and to not mix them with the global dotnet installation: https://github.com/dotnet/macios/blob/main/msbuild/Messaging/Xamarin.Messaging.Build/TaskRunner.cs#L62C4-L66C6

If the user assigns the global dotnet installation to the "_DotNetRootRemoteDirectory" MSBuild property, the Build agent will end up overriding the HOME folder with a custom home that doesn't exist (there's no .home folder in the user profile in the Mac (where dotnet installs the global caches).

This issue has been revealed from the recent changes that allows the MSBuild client to bypass the "_DotNetRootRemoteDirectory" property to the Build Agent: https://dev.azure.com/devdiv/DevDiv/_git/ClientTools.Platform/pullrequest/663026

The fix consists of setting the custom home only if the dotnet SDK path to use is not the global one
@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2
Copy link
Collaborator

✅ [CI Build #15bd0b4] Build passed (Build packages) ✅

Pipeline on Agent
Hash: 15bd0b45287c25972c44596d009bbd2c8876e4ee [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

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

Pipeline on Agent
Hash: 15bd0b45287c25972c44596d009bbd2c8876e4ee [PR build]

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2
Copy link
Collaborator

✅ [CI Build #15bd0b4] Build passed (Build macOS tests) ✅

Pipeline on Agent
Hash: 15bd0b45287c25972c44596d009bbd2c8876e4ee [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

✅ API diff for current PR / commit

.NET ( No breaking changes )

✅ API diff vs stable

.NET ( No breaking changes )

ℹ️ Generator diff

Generator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes)

Pipeline on Agent
Hash: 15bd0b45287c25972c44596d009bbd2c8876e4ee [PR build]

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2
Copy link
Collaborator

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

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

Pipeline on Agent
Hash: 15bd0b45287c25972c44596d009bbd2c8876e4ee [PR build]

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2
Copy link
Collaborator

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

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

Pipeline on Agent
Hash: 15bd0b45287c25972c44596d009bbd2c8876e4ee [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

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

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

Pipeline on Agent
Hash: 15bd0b45287c25972c44596d009bbd2c8876e4ee [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

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

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

Pipeline on Agent
Hash: 15bd0b45287c25972c44596d009bbd2c8876e4ee [PR build]

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2
Copy link
Collaborator

🚀 [CI Build #15bd0b4] Test results 🚀

Test results

✅ All tests passed on VSTS: test results.

🎉 All 128 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 10 tests passed. Html Report (VSDrops) Download
✅ monotouch (MacCatalyst): All 15 tests passed. [attempt 2] Html Report (VSDrops) Download
✅ monotouch (macOS): All 12 tests passed. Html Report (VSDrops) Download
✅ monotouch (tvOS): All 10 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: 15bd0b45287c25972c44596d009bbd2c8876e4ee [PR build]

@dalexsoto dalexsoto merged commit 7435114 into main Sep 4, 2025
40 checks passed
@dalexsoto dalexsoto deleted the dev/maagno/main branch September 4, 2025 15:13
dalexsoto pushed a commit that referenced this pull request Sep 4, 2025
We were setting a custom home folder (.home directory defined in the
DOTNET_CUSTOM_HOME env var) when the dotnet SDK was installed by Pair To
Mac, to encapsulate caches and to not mix them with the global dotnet
installation:
https://github.com/dotnet/macios/blob/main/msbuild/Messaging/Xamarin.Messaging.Build/TaskRunner.cs#L62C4-L66C6

If the user assigns the global dotnet installation to the
"_DotNetRootRemoteDirectory" MSBuild property, the Build agent will end
up overriding the HOME folder with a custom home that doesn't exist
(there's no .home folder in the user profile in the Mac (where dotnet
installs the global caches).

This issue has been revealed from the recent changes that allows the
MSBuild client to bypass the "_DotNetRootRemoteDirectory" property to
the Build Agent:
https://dev.azure.com/devdiv/DevDiv/_git/ClientTools.Platform/pullrequest/663026

The fix consists of setting the custom home only if the dotnet SDK path
to use is not the global one

---------

Co-authored-by: GitHub Actions Autoformatter <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
not-notes-worthy Ignore for release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants