Metal toolchain compilation error after migration to MacOS 26 and XCode 26.1

Hello. I migrated yesterday two machines from OS15 to OS26 (same Ram; M1Max chip). On the first one, a MBP, everything is allright, and my old Metal projects can compile and run, even with MacOS12 as a destination.

On the second computer (MacStudio) I got a compile "error: cannot execute tool 'metal' due to missing Metal Toolchain; use: xcodebuild -downloadComponent MetalToolchain".

I spent hours on many forums and tried all proposed solutions and still get the same error. Any idea? Thanks

The tooling for Metal became an optional download with Xcode 26, as only some developers need those capabilities. If you look to Xcode > Settings > Components, and try to download and install it, what happens? The text of the error you shared there is also a command you can run in Terminal to do the same thing. If there are error messages when installing the toolchain from Xcode settings or in Terminal, please include a screenshot or the full error message text.

— Ed Ford,  DTS Engineer

Thanks. Couldn't succeed after many tries of downloading and install (errors about permissions to read or execute...). I succeeded following the "protocol" described here: https://medium.com/@sergey-pekar/how-to-fix-annoying-xcode-26-not-building-swiftui-previews-error-cannot-execute-tool-metal-due-49564e20357c

What I don"t understand is that on my M1Max MBP, Metal was already OK without any setting, and I could compile my project once XCode 26 was downloaded and installed

Metal toolchain compilation error after migration to MacOS 26 and XCode 26.1
 
 
Q