Xcode_26 not compiling Metal project

Hello

Xcode 26.0.1 (17A400) Missing some Metal components

When building a program using Metal, it induces an unexpected error :

“error: error: cannot execute tool 'metal' due to missing Metal Toolchain; use: xcodebuild -downloadComponent MetalToolchain Command CompileMetalFile failed with a nonzero exit code”

Which terminates the build

The fix given “xcodebuild -downloadComponent MetalToolchain” using sudo does not work

Did someone find a work around or could resolve the issue?

Many thanks

Jean

MacBook Air M4; macOS 26.0.1; Xcode 26.0.1

Hi JMDelh,

I'm sorry you're experiencing this issue. Could you file a Feedback Assistant ticket and post the number here? I can help route it to the appropriate team.

I encountered the same problem(https://developer.apple.com/forums/thread/805547) and the Feedback Assistant: FB20864165

@JMDelh Have you solved this problem?

after two days try I fixed this problem by followed the methods in this article(https://medium.com/@sergey-pekar/how-to-fix-annoying-xcode-26-not-building-swiftui-previews-error-cannot-execute-tool-metal-due-49564e20357c), I think it is also has a bug for install Metal Toolchain at least for those migrated from Xcode26 Beta

Xcode_26 not compiling Metal project
 
 
Q