Project could not be compiled. Try rebuilding from source manually ERROR !Help please!

Hey. Was unsure where to post this issue; I hope I am in the right place.

I am receiving the following errors:

"The following modules are missing or built with a different engine version:
UE4Editor-BattleTank.dll
Would you like to rebuild them now?"

And this after I select yes:

"BattleTank could not be compiled. Try rebuilding from source manually."

In the build log before the error comes up and this is how it read:

Running C:/Program Files/Epic Games/UE_4.18/Engine/Binaries/DotNET/UnrealBuildTool.exe BattleTank Development Win64 -project=“C:/Users/Master/Documents/GitHub/BattleTankUnreal/BattleTank/BattleTank.uproject” -editorrecompile -progress -NoHotReloadFromIDE
Using ‘git status’ to determine working set for adaptive non-unity build.
Creating makefile for BattleTank (no existing makefile)

I’ve tried generating my visual studio files. I’ve tried re-installing visual studio. I’ve tried reverting my commits on Github - this has worked a couple of times, but then when I finish up making changes to my project (and them commiting/pushing those changes), the next time I open them, these same problems pop up again. It may have something to do with Github, but I’m really not sure how. I’ve been searching for an online solution but am yet to find one.

Any help would be greatly appreciated!

Thanks,
J

PS. I’ve been using the same Engine version the whole time, which is Unreal 4.18

u found any solutions yet?

Did you not see how old this post is?

you can find some solutions here:

1 Like

I have the same issue but the project was made with blueprints
​​​​​

If you have tried:
Deleting ‘Binaries’, ‘Intermediate’, and ‘Saved’ folders
Right click on ‘.uproject’ file and clicking on ‘Generate Visual Studio Project Files’
Double clicking on the ‘.uproject’ and hitting yes to build

If the above hasn’t worked, then it could be an issue with c++ code. It logs the error in the ‘Saved->Logs’ folder. I just solved my issue by fixing my compiler errors this way. then you can try deleting the above folders and building again and it all worked for me. I don’t know what your specific problem is though.

2 Likes

I got this error when trying to open a UE 5.1 project in UE 5.3. I had to upgrade from Visual Studio 2019 to Visual Studio 2022 then it worked.

1 Like

Figured I would add this just in case it can help someone. Hard to find solutions sometimes.

Anyway, the problem :
I was getting the “Project could not be compiled…” error when I would try to open the project from the Unreal Engine ‘hub’ (?) or from the project file in Windows Explorer. However, when I manually compiled the project in Visual Studio, it would complete with no errors. Unreal Editor was not VISIBLY open. However, because it had crashed earlier, it never shut down properly and the process was still running in the background.

The solution :
After opening the Task Manager and ending the Unreal Editor process, I was able to open the project normally, without any code changes. So, you actually may not have any issues with your code or corruption in your project. You may just need to make sure the editor process stopped last time you had the project open. Hope it helps.

Almost forgot. Also, I didn’t have to delete any folders or, as far as I could tell, even rebuild the project. However, in the Editor Preferences I have enabled ‘Force Compilation at Startup’.

I just fixed this issue. Pretty annoying. Mine was a very similar problem with the game not loading, giving me this error: “The game module could not be loaded. There may be an operating system error, the module may not be properly set up, or a plugin which has been included into the build has not been turned on.”

I was trying to use the “Enhanced Input” module. I added it to my build.cs file and from then on I had issues even though I could use the #includes that come with the module.

The fix was removing that module first and all the includes and commenting out the code relying on it.

Then I loaded up my game (it worked at this point without the module)

Searched for and added the Enhanced Input Plugin through the editor.

Then I closed the project.

Then I opened the workspace and readded all the code I wanted. Made sure there were no errors. Then closed the project.

Now delete the intermediate and binary files.

Then I right clicked on my uproject file → Generate Visual Studio project files.

Try and open the game now (not through your workspace)

It asks you to generate the files you deleted. Which you need to agree to.

Then the game loads up, no more issues… So far lol

I hope this helps someone save 45 freaking minutes!

I still get the error and it’s not solved; I have been trying all the possible steps but didn’t work, idk what to do now, it’s just sad all the work might be gone like nothing.

What I’ve done was delete the ‘binary’ ‘intermediate’ and ‘saved’ folders, then right clicked on the uproject in the files and regenerated the visual studio files

I am on Linux (Editor version 5.3) and my workaround is deleting the project and using VCS to retrieve it again so that the project can be opened, hence, similar to deleting certain folders. However, I have had no luck finding out which files are causing the issue, and even after the project is downloaded again the error message persists even though it is possible to run the project…

Would be nice with a solution for such a major issue and not just workarounds.