Metal shader compilation fails on Xcode 26.1.1 due to missing Metal Toolchain
16:54 08 Dec 2025

I am trying to compile some Metal shaders using Xcode 26.1.1 on macOS 26.1, but it fails with this:

error: cannot execute tool 'metal' due to missing Metal Toolchain; use: xcodebuild -downloadComponent MetalToolchain

The first thing that I've tried was installing the toolchain from Xcode settings, but it didn't help. The suggested command doesn't work as well. After that, I've tried installing the toolchain manually, but failed to fix anything as well.

The only thing that works is manually opening the .dmg file and keeping it mounted for as long as Xcode is running.

This behavior initially appeared while testing macOS 26.0 beta version and has persisted since then. Has anyone encountered this issue or found a proper solution?

swift xcode metal