Marco Siccardi traces why dotnet build on a MAUI project froze for five minutes at a time inside Claude Code's macOS sandbox. Two of the three stacked restrictions fall to MSBuild node and task host flags; the third, asset catalog compilation via actool, still requires turning the sandbox off.
Key points
- The same build finishes in 1.4 seconds outside the sandbox, so reproduce it yourself before trusting an agent's diagnosis.
- The sandbox blocks bind() on Unix sockets, which prevents MSBuild from spawning an out-of-process worker node.
- Forcing a single node with `-m:1 -nodeReuse:false` removes the hang during the restore-graph walk.
- `allowLocalBinding` only governs IP/TCP ports; Unix domain sockets are controlled by separate settings.
- `-p:_UseDesktopTaskAssemblies=true` fixes the MSB4216 error from ILLink's out-of-process `ComputeManagedAssemblies` task.
- actool still fails because it needs CoreSimulatorService over XPC and writes outside the sandbox, so iOS and MacCatalyst builds need a bypass.
Real-world use
- Adding a separate xUnit test project for a MAUI app's view models while building inside Claude Code's sandbox.
- Re-running an agent-reported build in your own VS Code terminal to confirm whether the sandbox causes the slowdown.
- Getting a local iOS or MacCatalyst build to complete inside an agentic tool's sandbox.
This summary was generated by the agent from the original post on Marco Siccardi. The full text and all rights belong to its author and publisher. Go to original