Error When compiling mac project on unreal 4

I keep getting an error that I don’t know how to solve when compiling a Mac project for Unreal 4 in XCode. The error is:
“Command ExternalBuildTool Execution failed with a nonzero exit code”

I am using:
Xcode 13.4.1
Mac OS 12.4
Unreal Engine 4.27.2

Here is the full stack trace of the error:

Found mono via known Mono.framework path
Running system mono/msbuild, version: Mono JIT compiler version 6.12.0.182 (2020-02/6051b710727 Tue Jun 14 15:01:21 EDT 2022)
Processing build for Target=BlocksEditor Platform=Mac Configuration=Development -architecture=x86_64 /Volumes/DroneKit/AirSim/Unreal/Environments/Blocks/Blocks.uproject 
Creating makefile for ShaderCompileWorker (no existing makefile)
ERROR: Couldn't find target rules file for target 'ShaderCompileWorker' in rules assembly 'UE4Rules, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'.
       Location: /Volumes/DroneKit/Unreal_4.27/UE_4.27/Engine/Intermediate/Build/BuildRules/UE4Rules.dll
       Target rules found:
Running Engine/Binaries/DotNET/UnrealBuildTool.exe BlocksEditor Mac Development /Volumes/DroneKit/AirSim/Unreal/Environments/Blocks/Blocks.uproject -architecture=x86_64
Invalidating makefile for BlocksEditor (BlocksEditor.Target.cs modified)
While compiling /Volumes/DroneKit/AirSim/Unreal/Environments/Blocks/Intermediate/Build/BuildRules/BlocksModuleRules.dll:
../../../../AirSim/Unreal/Environments/Blocks/Source/._Blocks.Target.cs(1,2) : error CS1056: Unexpected character `'
../../../../AirSim/Unreal/Environments/Blocks/Source/._Blocks.Target.cs(1,3) : error CS1056: Unexpected character `'
../../../../AirSim/Unreal/Environments/Blocks/Source/._Blocks.Target.cs(1,4) : error CS1056: Unexpected character `a'
../../../../AirSim/Unreal/Environments/Blocks/Source/._Blocks.Target.cs(1,6) : error CS1056: Unexpected character `'
../../../../AirSim/Unreal/Environments/Blocks/Source/._Blocks.Target.cs(1,8) : error CS1525: Unexpected symbol `Mac'
../../../../AirSim/Unreal/Environments/Blocks/Source/._Blocks.Target.cs(1,26) : error CS1056: Unexpected character `'
../../../../AirSim/Unreal/Environments/Blocks/Source/._Blocks.Target.cs(1,37) : error CS1056: Unexpected character `'
../../../../AirSim/Unreal/Environments/Blocks/Source/._Blocks.Target.cs(1,38) : error CS1056: Unexpected character `?'
../../../../AirSim/Unreal/Environments/Blocks/Source/._Blocks.Target.cs(1,42) : error CS1056: Unexpected character `'
../../../../AirSim/Unreal/Environments/Blocks/Source/._Blocks.Target.cs(1,45) : error CS1056: Unexpected character `'
../../../../AirSim/Unreal/Environments/Blocks/Source/._Blocks.Target.cs(1,46) : error CS1056: Unexpected character `?'
../../../../AirSim/Unreal/Environments/Blocks/Source/._Blocks.Target.cs(1,49) : error CS1056: Unexpected character `'
../../../../AirSim/Unreal/Environments/Blocks/Source/._Blocks.Target.cs(1,50) : error CS1056: Unexpected character `'
../../../../AirSim/Unreal/Environments/Blocks/Source/._Blocks.Target.cs(1,92) : error CS1056: Unexpected character `'
../../../../AirSim/Unreal/Environments/Blocks/Source/._Blocks.Target.cs(1,95) : error CS1056: Unexpected character `'
../../../../AirSim/Unreal/Environments/Blocks/Source/._Blocks.Target.cs(1,96) : error CS1056: Unexpected character `?'
../../../../AirSim/Unreal/Environments/Blocks/Source/._Blocks.Target.cs(1,100) : error CS1056: Unexpected character `?'
../../../../AirSim/Unreal/Environments/Blocks/Source/._Blocks.Target.cs(1,104) : error CS1056: Unexpected character `'
../../../../AirSim/Unreal/Environments/Blocks/Source/._Blocks.Target.cs(1,120) : error CS1056: Unexpected character `'
../../../../AirSim/Unreal/Environments/Blocks/Source/._Blocks.Target.cs(1,124) : error CS1056: Unexpected character `?'
../../../../AirSim/Unreal/Environments/Blocks/Source/._Blocks.Target.cs(1,128) : error CS1056: Unexpected character `'
../../../../AirSim/Unreal/Environments/Blocks/Source/._Blocks.Target.cs(1,131) : error CS1056: Unexpected character `'
../../../../AirSim/Unreal/Environments/Blocks/Source/._Blocks.Target.cs(1,154) : error CS1040: Preprocessor directives must appear as the first non-whitespace character on a line
../../../../AirSim/Unreal/Environments/Blocks/Source/._Blocks.Target.cs(1,161) : error CS1056: Unexpected character `?'
../../../../AirSim/Unreal/Environments/Blocks/Source/._Blocks.Target.cs(1,163) : error CS1056: Unexpected character `?'
../../../../AirSim/Unreal/Environments/Blocks/Source/._Blocks.Target.cs(1,169) : error CS1056: Unexpected character `?'
../../../../AirSim/Unreal/Environments/Blocks/Source/._Blocks.Target.cs(1,171) : error CS1056: Unexpected character `e'
../../../../AirSim/Unreal/Environments/Blocks/Source/._Blocks.Target.cs(1,172) : error CS1040: Preprocessor directives must appear as the first non-whitespace character on a line
../../../../AirSim/Unreal/Environments/Blocks/Source/._Blocks.Target.cs(1,255) : error CS1056: Unexpected character `'
../../../../AirSim/Unreal/Environments/Blocks/Source/._Blocks.Target.cs(1,255) : error CS1056: Unexpected character `'
../../../../AirSim/Unreal/Environments/Blocks/Source/._Blocks.Target.cs(1,255) : error CS1056: Unexpected character `'
../../../../AirSim/Unreal/Environments/Blocks/Source/._Blocks.Target.cs(1,255) : error CS1056: Unexpected character `'
../../../../AirSim/Unreal/Environments/Blocks/Source/._Blocks.Target.cs(1,255) : error CS1056: Unexpected character `'
../../../../AirSim/Unreal/Environments/Blocks/Source/._Blocks.Target.cs(1,255) : error CS1056: Unexpected character `'
../../../../AirSim/Unreal/Environments/Blocks/Source/._Blocks.Target.cs(1,255) : error CS1056: Unexpected character `'
../../../../AirSim/Unreal/Environments/Blocks/Source/._Blocks.Target.cs(1,255) : error CS1056: Unexpected character `'
../../../../AirSim/Unreal/Environments/Blocks/Source/._Blocks.Target.cs(1,255) : error CS1056: Unexpected character `?'
../../../../AirSim/Unreal/Environments/Blocks/Source/._Blocks.Target.cs(1,255) : error CS1056: Unexpected character `?'
../../../../AirSim/Unreal/Environments/Blocks/Source/._BlocksEditor.Target.cs(1,2) : error CS1056: Unexpected character `'
../../../../AirSim/Unreal/Environments/Blocks/Source/._BlocksEditor.Target.cs(1,3) : error CS1056: Unexpected character `'
../../../../AirSim/Unreal/Environments/Blocks/Source/._BlocksEditor.Target.cs(1,4) : error CS1056: Unexpected character `a'
../../../../AirSim/Unreal/Environments/Blocks/Source/._BlocksEditor.Target.cs(1,6) : error CS1056: Unexpected character `'
../../../../AirSim/Unreal/Environments/Blocks/Source/._BlocksEditor.Target.cs(1,8) : error CS1525: Unexpected symbol `Mac'
../../../../AirSim/Unreal/Environments/Blocks/Source/._BlocksEditor.Target.cs(1,26) : error CS1056: Unexpected character `'
../../../../AirSim/Unreal/Environments/Blocks/Source/._BlocksEditor.Target.cs(1,37) : error CS1056: Unexpected character `'
../../../../AirSim/Unreal/Environments/Blocks/Source/._BlocksEditor.Target.cs(1,38) : error CS1056: Unexpected character `?'
../../../../AirSim/Unreal/Environments/Blocks/Source/._BlocksEditor.Target.cs(1,42) : error CS1056: Unexpected character `'
../../../../AirSim/Unreal/Environments/Blocks/Source/._BlocksEditor.Target.cs(1,45) : error CS1056: Unexpected character `'
../../../../AirSim/Unreal/Environments/Blocks/Source/._BlocksEditor.Target.cs(1,46) : error CS1056: Unexpected character `?'
../../../../AirSim/Unreal/Environments/Blocks/Source/._BlocksEditor.Target.cs(1,49) : error CS1056: Unexpected character `'
../../../../AirSim/Unreal/Environments/Blocks/Source/._BlocksEditor.Target.cs(1,50) : error CS1056: Unexpected character `'
../../../../AirSim/Unreal/Environments/Blocks/Source/._BlocksEditor.Target.cs(1,92) : error CS1056: Unexpected character `'
../../../../AirSim/Unreal/Environments/Blocks/Source/._BlocksEditor.Target.cs(1,95) : error CS1056: Unexpected character `'
../../../../AirSim/Unreal/Environments/Blocks/Source/._BlocksEditor.Target.cs(1,96) : error CS1056: Unexpected character `?'
../../../../AirSim/Unreal/Environments/Blocks/Source/._BlocksEditor.Target.cs(1,100) : error CS1056: Unexpected character `?'
../../../../AirSim/Unreal/Environments/Blocks/Source/._BlocksEditor.Target.cs(1,104) : error CS1056: Unexpected character `'
../../../../AirSim/Unreal/Environments/Blocks/Source/._BlocksEditor.Target.cs(1,120) : error CS1056: Unexpected character `'
../../../../AirSim/Unreal/Environments/Blocks/Source/._BlocksEditor.Target.cs(1,124) : error CS1056: Unexpected character `?'
../../../../AirSim/Unreal/Environments/Blocks/Source/._BlocksEditor.Target.cs(1,128) : error CS1056: Unexpected character `'
../../../../AirSim/Unreal/Environments/Blocks/Source/._BlocksEditor.Target.cs(1,131) : error CS1056: Unexpected character `'
../../../../AirSim/Unreal/Environments/Blocks/Source/._BlocksEditor.Target.cs(1,154) : error CS1040: Preprocessor directives must appear as the first non-whitespace character on a line
../../../../AirSim/Unreal/Environments/Blocks/Source/._BlocksEditor.Target.cs(1,161) : error CS1056: Unexpected character `?'
../../../../AirSim/Unreal/Environments/Blocks/Source/._BlocksEditor.Target.cs(1,163) : error CS1056: Unexpected character `?'
../../../../AirSim/Unreal/Environments/Blocks/Source/._BlocksEditor.Target.cs(1,170) : error CS1056: Unexpected character `?'
../../../../AirSim/Unreal/Environments/Blocks/Source/._BlocksEditor.Target.cs(1,255) : error CS1056: Unexpected character `'
../../../../AirSim/Unreal/Environments/Blocks/Source/._BlocksEditor.Target.cs(1,255) : error CS1056: Unexpected character `'
../../../../AirSim/Unreal/Environments/Blocks/Source/._BlocksEditor.Target.cs(1,255) : error CS1056: Unexpected character `'
../../../../AirSim/Unreal/Environments/Blocks/Source/._BlocksEditor.Target.cs(1,255) : error CS1056: Unexpected character `'
../../../../AirSim/Unreal/Environments/Blocks/Source/._BlocksEditor.Target.cs(1,255) : error CS1056: Unexpected character `'
../../../../AirSim/Unreal/Environments/Blocks/Source/._BlocksEditor.Target.cs(1,255) : error CS1056: Unexpected character `'
../../../../AirSim/Unreal/Environments/Blocks/Source/._BlocksEditor.Target.cs(1,255) : error CS1056: Unexpected character `'
../../../../AirSim/Unreal/Environments/Blocks/Source/._BlocksEditor.Target.cs(1,255) : error CS1056: Unexpected character `'
../../../../AirSim/Unreal/Environments/Blocks/Source/._BlocksEditor.Target.cs(1,255) : error CS1056: Unexpected character `?'
../../../../AirSim/Unreal/Environments/Blocks/Source/._BlocksEditor.Target.cs(1,255) : error CS1056: Unexpected character `?'
ERROR: Unable to compile source files.
Command ExternalBuildToolExecution failed with a nonzero exit code