"Could not be compiled. Try rebuilding from source manually."

Okay, I messed up something real good. A project cannot be restored in a traditional way (Checkout and Rebuild). This is only for a single project, others are working properly.


Someone had this before? Any ideas how I could rebuild it manually?

2 Likes

Try opening the Visual Studio solution and building the project from there. If that doesn’t work try clearing the derived files like this…

  1. Close Unreal and Visual Studio
  2. Delete the following folders: Binaries, Build, Intermediate, Saved
  3. Delete the Visual Studio or Xcode solution file (.sln or .xcodeproj)
  4. Re-open Unreal

Good luck!

15 Likes

I get the error above when I try to open the project in Unreal after doing these four steps.

1 Like

Hmm, sounds like you may have some corruption. Can you go back to a previous commit of either yours or ours?

1 Like

My bad. I was checking out with uncommitted changes. Those were making the project un-compilable. Maybe someone will learn from this. Thanks, Ben.

3 Likes

You are welcome, thank you for marking the solution too!

1 Like

Yes this helped me! I had this happen to me as well.

1 Like

I had a similar issue, but mine wasn’t solved by rebuilding alone.
I made the mistake of letting VS update to a new version that was incompatible with Unreal 4.11

Unreal was notified of this issue and made a fix in 4.12.5 that resolved the issue.

  1. Install version 4.12.5 from the epic game launcher
  2. Clear out your temporary files
  3. You can right click on the .uproject file from the explorer and select “switch unreal engine version”
  4. Double click the uproject file to open and it should rebuild the .dll properly and open the editor

https://answers.unrealengine.com/questions/435600/build-failed-with-vs-2015-update-3.html

4 Likes

I am having the same problem ben and i’ve tried all your 4 steps and David_Witt’s steps and it still gives me that error. What kind of corruption do I haveee!!??

1 Like

This is the error VS gives me

1>------ Build started: Project: UE4, Configuration: BuiltWithUnrealBuildTool Win32 ------
2>------ Build started: Project: BattleTank, Configuration: Development_Editor x64 ------
2>“C:\Program Files\Epic Games\UE_4.15\Engine\Build\BatchFiles\Build.bat” BattleTankEditor Win64 Development “D:\Unreal Projects\Battle Tank\BattleTank\BattleTank.uproject” -waitmutex
2>Distributing 7 actions to XGE
2>EXEC : Fatal error : Failed to start build.
2>Failed to connect to Build Service (on local machine): Server is not reachable
2>
2>
2>ERROR : UBT error : Failed to produce item: D:\Unreal Projects\Battle Tank\BattleTank\Binaries\Win64\UE4Editor-BattleTank.dll
2>Total build time: 1.16 seconds (XGE executor: 0.00 seconds)
2>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.MakeFile.Targets(44,5): error MSB3075: The command ““C:\Program Files\Epic Games\UE_4.15\Engine\Build\BatchFiles\Build.bat” BattleTankEditor Win64 Development “D:\Unreal Projects\Battle Tank\BattleTank\BattleTank.uproject” -waitmutex” exited with code 5. Please verify that you have sufficient rights to run this command.
2>Done building project “BattleTank.vcxproj” – FAILED.
========== Build: 1 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

And I have given permission to that file that says I do not have rights to run this command.

2 Likes

I think the problem is that a few days ago I updated VS because it gave me a notification to update it, and so I did. I don’t know, just guessing. I think UE4 is not compatible with the new VS update I installed a few days ago. I’ve updated the UE4 as well, and still no luck.

Your help will be appreciated,

Thank You

If you open the solution in VS and compile what error do you get?

1>------ Build started: Project: UE4, Configuration: BuiltWithUnrealBuildTool Win32 ------
2>------ Build started: Project: BattleTank, Configuration: Development_Editor x64 ------
2>“C:\Program Files\Epic Games\UE_4.15\Engine\Build\BatchFiles\Build.bat” BattleTankEditor Win64 Development “D:\Unreal Projects\Battle Tank\BattleTank\BattleTank.uproject” -waitmutex
2>Distributing 7 actions to XGE
2>EXEC : Fatal error : Failed to start build.
2>Failed to connect to Build Service (on local machine): Server is not reachable
2>
2>
2>ERROR : UBT error : Failed to produce item: D:\Unreal Projects\Battle Tank\BattleTank\Binaries\Win64\UE4Editor-BattleTank.dll
2>Total build time: 1.16 seconds (XGE executor: 0.00 seconds)
2>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.MakeFile.Targets(44,5): error MSB3075: The command ““C:\Program Files\Epic Games\UE_4.15\Engine\Build\BatchFiles\Build.bat” BattleTankEditor Win64 Development “D:\Unreal Projects\Battle Tank\BattleTank\BattleTank.uproject” -waitmutex” exited with code 5. Please verify that you have sufficient rights to run this command.
2>Done building project “BattleTank.vcxproj” – FAILED.
========== Build: 1 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Sorry I missed that. Was this after doing something else like uninstalling VS 2015? or Upgrading engine?

I have VS 2017 installed and it works fine with UE 4.15.1 with Building Escape (the previous section in the course). I updated this before I try to create the Battle Tank project.

Not entirely sure, so it still compiles fine in 2015?

Here is a video https://www.dropbox.com/s/4ldrs1fdj47dtd3/Dealing%20with%20error%20after%20error.mp4?dl=0

I’ve never had installed VS 2015

Try installing this
http://landinghub.visualstudio.com/visual-cpp-build-tools

As well as running the VS installer and installing the Win8.1 SDK

3 Likes

Privacy & Terms