Command line compilation error - UAT

I try to compile a sample project, but i meet this trouble…


R:\EpicLibrary\UE_4.25\Engine\Build\BatchFiles>RunUAT BuildCookRun -project=W:\Developer\UnrealProjects\Sandbox\Sandbox.uproject -noP4 -platform=Win64 -clientconfig=Shipping -serverconfig=Shipping -cook -maps=AllMaps -compile -stage -pak -archive -archivedirectory=W:\Developer\UnrealProjects\Sandbox\BuildLess

Running AutomationTool…

Parsing command line: BuildCookRun -project=W:\Developer\UnrealProjects\Sandbox\Sandbox.uproject -noP4 -platform=Win64 -clientconfig=Shipping -serverconfig=Shipping -cook -maps=AllMaps -compile -stage -pak -archive -archivedirectory=W:\Developer\UnrealProjects\Sandbox\BuildLess

Dependencies are out of date. Compiling scripts…

R:\EpicLibrary\UE_4.25\Engine\Programs\AutomationTool\Saved\UATTempProj.proj(3,5): error MSB4035: Required attribute Include is empty or missing.

Took 0,1777505s to run MSBuild.exe, ExitCode=1

ERROR: Failed to build “R:/EpicLibrary/UE_4.25/Engine/Programs/AutomationTool/Saved\UATTempProj.proj”:
R:\EpicLibrary\UE_4.25\Engine\Programs\AutomationTool\Saved\UATTempProj.proj(3,5): error MSB4035: Required attribute Include is empty or missing in .

   (see C:\Users\wojtek360HL\AppData\Roaming\Unreal Engine\AutomationTool\Logs\R+EpicLibrary+UE_4.25\Log.txt for full exception trace)

AutomationTool exiting with ExitCode=1 (Error_Unknown)
BUILD FAILED

What should I do to pack this sample (FirstPersonShooter)?

Same problem here while configuring a Jenkins worker. Never had this one before. Did you manage to resolve this ?

I’m also having this issue. Have any of you figured how to solve this?

I was using a blueprint only project so I just added -nocompile to the buildcookrun command.
something like :
E:\UnrealEngine\UE_4.25\Engine/Build/BatchFiles/RunUAT.bat" BuildCookRun -rocket -nocompile -installed -nop4 -project= …

I posted my answer down there. I hope it can fix your problem too.

I was running into a similar issue after we updated from 4.24 to 4.25
Since our project has a lot of C++ code, adding -nocompile was no option. Once I added -ue4exe=“C:\Programs\Epic Games\UE_4.25\Engine\Binaries\Win64\UE4Editor-Cmd.exe” the error was gone. I assume that the 4.25 UAT needs this engine path specification to work.
When just opening your project in the editor and packaging it, you can find the RunUAT.bat string with all its args in the output log. This often helps with fixing such build errors :slight_smile:

Hello, where did you add that line of code at?

Are you packaging your project using the editor or using UAT through the commandline @Oleksandr_Thanku ?
The fix only works when using UAT through the commandline. In case you are packaging using the editor / front end tool you are probably facing a different issue.

I just ran into this problem as well. For context I was setting up our jenkins build process with an unreal project with c++ files and was running into this error:

 error MSB4035: The required attribute "Include" is empty or missing from the element <ModulesToBuild>.

-nocompile allowed us to build but wouldn’t compile the c++ files.

@Featuriing 's answer led me to the fix for our problem as well. @Oleksandr_Thanku here is the full windows command with the fix also for anyone else running into this problem in the future.

You can find the output.log in unreal by going to Window->Developer Tools-> Output Log and after making a package you can find the command line arguments unreal uses to build.

It’ll look something like Parsing command lin: -ScriptsForProject=...

Here is the full command I used for this step in Jenkins

"C:\Program Files\Epic Games\UE_4.27\Engine\Build\BatchFiles\RunUAT.bat" BuildCookRun -rocket -nocompile -compileeditor -installed -nop4 -project="%WORKSPACE%/%PROJECT_NAME%.uproject" -cook -stage -archive -archivedirectory="%WORKSPACE%/temp/Development/x64" -package 
-clientconfig=Development -ue4exe="C:\Program Files\Epic Games\UE_4.27\Engine\Binaries\Win64\UE4Editor-Cmd.exe" -clean -pak -prereqs -distribution -nodebuginfo -targetplatform=Win64 -build -utf8output
1 Like

change the -nocompile to -compile pasted the info in wrong by accident

Could you help me how to set command line correctly? THanks!

E:\UE_5.0\Engine\Build\BatchFiles\RunUAT.bat -ScriptsForProject=“F:/UE5Project/digitalTwin/ue5/digitalTwin.uproject” Turnkey -command=VerifySdk -platform=Win64 -UpdateIfNeeded -project=“F:/UE5Project/digitalTwin/ue5/digitalTwin.uproject” BuildCookRun -nop4 -utf8output -nocompileeditor -cook -allmaps -project=“F:/UE5Project/digitalTwin/ue5/digitalTwin.uproject” -target=digitalTwin -unrealexe=“E:\UE_5.0\Engine\Binaries\Win64\UnrealEditor-Cmd.exe” -platform=Win64 -ddc=InstalledDerivedDataBackendG
raph -installed -stage -archive -package -build -compressed -iostore -pak -prereqs -archivedirectory=“C:/package/Windows” -clientconfig=Development -compile