UnrealBuildTool cannot find its csproj file

so I am using this command

mono UnrealBuildTool.exe -codelitefile -project="/Users//Documents/Unreal Projects/Periastron/Periastron.uproject" -game -engine

and getting this error

iscovering modules, targets and source code for project...
UnrealBuildTool Exception: System.IO.DirectoryNotFoundException: Could not find a part of the path "/Users/Shared/UnrealEngine/4.13/Engine/Source/Programs/UnrealBuildTool/UnrealBuildTool.csproj".
  at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) [0x001cf] in <94fd79a3b7144c54b4cb162b50fc7761>:0
  at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize) [0x00000] in <94fd79a3b7144c54b4cb162b50fc7761>:0
  at (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare,int)
  at System.Xml.XmlDownloadManager.GetStream (System.Uri uri, System.Net.ICredentials credentials, System.Net.IWebProxy proxy, System.Net.Cache.RequestCachePolicy cachePolicy) [0x0001b] in <6f5b897a4e79420ea17c734c0583d6a2>:0
  at System.Xml.XmlUrlResolver.GetEntity (System.Uri absoluteUri, System.String role, System.Type ofObjectToReturn) [0x0003b] in <6f5b897a4e79420ea17c734c0583d6a2>:0
  at System.Xml.XmlTextReaderImpl.OpenUrlDelegate (System.Object xmlResolver) [0x0000c] in <6f5b897a4e79420ea17c734c0583d6a2>:0
  at System.Xml.XmlTextReaderImpl.OpenUrl () [0x00055] in <6f5b897a4e79420ea17c734c0583d6a2>:0
-iMac:DotNet $ mono UnrealBuildTool.exe -codelitefile -project="/Users//Documents/Unreal Projects/Periastron/Periastron.uproject" -game -engine
Discovering modules, targets and source code for project...
UnrealBuildTool Exception: System.IO.DirectoryNotFoundException: Could not find a part of the path "/Users/Shared/UnrealEngine/4.13/Engine/Source/Programs/UnrealBuildTool/UnrealBuildTool.csproj".
  at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) [0x001cf] in <94fd79a3b7144c54b4cb162b50fc7761>:0
  at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize) [0x00000] in <94fd79a3b7144c54b4cb162b50fc7761>:0
  at (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare,int)
  at System.Xml.XmlDownloadManager.GetStream (System.Uri uri, System.Net.ICredentials credentials, System.Net.IWebProxy proxy, System.Net.Cache.RequestCachePolicy cachePolicy) [0x0001b] in <6f5b897a4e79420ea17c734c0583d6a2>:0
  at System.Xml.XmlUrlResolver.GetEntity (System.Uri absoluteUri, System.String role, System.Type ofObjectToReturn) [0x0003b] in <6f5b897a4e79420ea17c734c0583d6a2>:0
  at System.Xml.XmlTextReaderImpl.OpenUrlDelegate (System.Object xmlResolver) [0x0000c] in <6f5b897a4e79420ea17c734c0583d6a2>:0
  at System.Xml.XmlTextReaderImpl.OpenUrl () [0x00055] in <6f5b897a4e79420ea17c734c0583d6a2>:0

I am on MacOS 10.11.6 with a late 2013 27’ iMac and Unreal 4.13 , any idea why the file does not exist ? Is there anything I can do to fix this ?

I am using this command to generate a workspace file for C++ IDE codelite as described here

after some investigation indeed even though /Users/Shared/UnrealEngine/4.13/Engine/Source/Programs does exist there is no sub folder UnrealBuildTool which explains why it cannot find the path, has this been removed in 4.13 , even though I see it exists in my 4.12 folder . Is this normal or a bug ?

I’m experiencing the same problem. If someone knows a solution for this I would really appreciate it.

I cannot use XCode, because XCode 8 has a known issue with UE4 which makes impossible to use it, so I’m looking for IDE alternatives on Mac.

I think I found a solution.

First, you have to clone the GitHub repository of the UnrealEngine somewhere. Then, checkout the tag for the version of the engine you’re using. Finally, copy over the files you need to /Users/Shared/UnrealEngine/4.X/Engine/Source/, for example:

$ git config -l | grep Unreal
remote.origin.url=git@github.com:EpicGames/UnrealEngine.git
$ git checkout -b 4.13.1-release 4.13.1-release
Switched to a new branch '4.13.1-release'
$ rsync -avr Engine/Source/Programs/ /Users/Shared/UnrealEngine/4.13/Engine/Source/Programs/

Then, I was able to generate the project without issues:

$ mono UnrealBuildTool.exe -codelitefile -project="/Users/agalue/Documents/Unreal Projects/BuildingEscape/BuildingEscape.uproject" -game -engine
Discovering modules, targets and source code for project...
Generating data for project indexing... 100%
Writing project files... 100%

The workspace for CodeLite was generated, and I can load it on CodeLite.

I don’t think thats the answer because UAT can use UnrealBuildTool just fine (As I explains to the C++ course Unreal forum) so most likely the arguments I use are not the correct ones.

Perfect, no problem. If you know better ways to do it, I appreciate the details.