C++ Projects Fail to Build on Mac

Hello, :wave:

I have a question about creating a 5.5.3 C++ project on macOS for anyone who knows.

Whenever I try to create a C++ project, I get the following error:

An error occurred while trying to generate project files.

Setting up bundled DotNet SDK
/Users/Shared/EpicGames/UE_5.5/Engine/Build/BatchFiles/Mac/../../../Binaries/ThirdParty/DotNet/8.0.300/mac-arm64
Running dotnet Engine/Binaries/DotNET/UnrealBuildTool/UnrealBuildTool.dll -projectfiles -project=/Users/MyUserName/Documents/Unreal Projects/MyProject/MyProject.uproject -game -rocket -progress
Unhandled exception: IOException: Permission denied
Wrapped by UnauthorizedAccessException: Access to the path '/Users/MyUserName/Documents/Library/Application Support/Epic/UnrealEngine' is denied.
   at System.IO.FileSystem.CreateDirectory(String fullPath, UnixFileMode unixCreateMode)
   at System.IO.Directory.CreateDirectory(String path)
   at EpicGames.Core.DirectoryReference.CreateDirectory(DirectoryReference location) in /Users/build/Build/++UE5/Sync/Engine/Saved/CsTools/Engine/Source/Programs/Shared/EpicGames.Core/DirectoryReference.cs:line 320
   at UnrealBuildTool.XmlConfig.ReadConfigFiles(FileReference overrideCacheFile, DirectoryReference projectRootDirectory, ILogger logger) in /Users/build/Build/++UE5/Sync/Engine/Saved/CsTools/Engine/Source/Programs/UnrealBuildTool/System/XmlConfig.cs:line 165
   at UnrealBuildTool.UnrealBuildTool.Main(String[] ArgumentsArray) in /Users/build/Build/++UE5/Sync/Engine/Saved/CsTools/Engine/Source/Programs/UnrealBuildTool/UnrealBuildTool.cs:line 559

So it looks like Unreal doesn’t have permission to access /Library. I’ve tried giving Unreal editor, Xcode, and DotNet full disk access and I’ve tried setting the folders from /Library to /5.5 to Read & Write for the Everyone user but the error is always the same.

Blueprint projects build without issue. Both C++ and Blueprint projects build without issue in 5.4.

Any advice on how to solve this would be appreciated. :slightly_smiling_face:

Cheers.

Okay, so it looks like unlike in previous versions of Unreal, 5.5 is trying to access a Library folder within the Documents folder instead of in the User folder.

If I set the permissions on /Documents/Library to Read & Write then I can generate my project.

Is there a reason this directory was changed? :thinking:

I’ve been pulling whatever hair I’ve got left on my scalp on this over the last few days, and I figured it out, so in case it helps:
Unreal looks for stuff in that User/Documents/Library folder, which adding the read/write permission wasn’t solving for me.

What did it was switching iCloud off for Documents.

It sounds obvious in hindsight, but it took me a while to think of. And once switched off, I was able to get going no problem.

Note that I was facing that issue regardless of where my project files were.