Generate Xcode Project: ERROR: UnrealBuildTool Exception: Unexpected ProjectFileFormat


I try to import my Unreal Project on my Mac (Sierra). I started it on Windows and created a git repo with a gitignore.
Today I checked it out and tried to generate the XCode Project. Opening the project with the UE4 Editor works, but I need the XCode Project for writing code. It fails with the following error:

sh "/Users/Shared/UnrealEngine/UE_4.18/Engine/Build/BatchFiles/Mac/" -project="/Users/christopher/Dev/UE4/battletank-ue-tutorial/BattleTank.uproject" -game

Setting up Unreal Engine 4 project files...

Discovering modules, targets and source code for project...
WARNING: Visual Studio C++ 2017 installation not found - ignoring preferred project file format.
Generating data for project indexing... 100%
Writing project files... 67%
ERROR: UnrealBuildTool Exception: Unexpected ProjectFileFormat

Any ideas on how to fix this?

I think that is possible, that there is a bug in the UnrealBuildTool. I think it tries to generate a VS Studio project on the Mac, which obviously not possible …

Another addition: I also tried to generate the project files via the Unreal Editor. It states “Generate None Project”. I guess, that Unreal can not see on which plattform it runs and tries to create VS project therefore.

Another edit: I tried a new C++ project. That worked, also as I deleted all folders but not “Content”, “Config” and “Source”, and re-created the XCode files . Does anyone know on what basis the Unreal Buildtool decides to create an XCode or VS project? I ran the in verbose mode, it actually really tries to create a VS XCoded on Mac OS.

I know how to fix this … I have a “DefaultEditorSettings.ini” file with the line

I did not create that file. In a new C++ project on my Mac, this file is not included. After deleting “VisualStudio2017” UnrealBuildTool generates the XCode files. I am not sure, if UE4 created that file, or VS. But it seems to cause the problem.

But I don’t now, if I should close this thread now?!

Hi pes04,

Sorry for not getting back to you sooner on this issue. The setting that you mentioned in the .ini file is automatically created if the Preferred Source Code Editor setting in the Editor is changed. You can probably add this .ini file to your .gitignore file so that it is not included in the repo. The settings in this file should only affect the local Editor where the settings were changed, and should not affect another Editor opening the project on a different computer.