Visual Studio update broke code

Hi all, I recently finished lecture 142 ‘How to Report Bugs’. My code was working fine and I made a commit. At this point, I noticed that Visual Studio had an update (15.5) available - I foolishly applied this update and now my code won’t work. Trying to open the Unreal file returns the message “BattleTank could not be compiled. Try rebuilding from source manually”. When I attempt to compile in the Visual Studio BattleTank solution, a whole load of errors are thrown up including ones saying that various headers are from a previous version.

I have tried deleting all the unnecessary files, rebuilding the project and regenerating the Visual Studio project files, but it didn’t work. I have also tried uninstalling and re-installing Visual Studio, then repeating the process, but to no avail.

Note that the following messages appear in the VS output when trying to compile, which I have never seen before so may be relevant:

1>Creating makefile for BattleTankEditor (no existing makefile)
1>Performing full C++ include scan (no include cache file)

Is there any fix for this? Is there any way to reverse the update? Do I have to start over again?

If anyone has any advice, it’d be much appreciated. Thanks.

Never mind, solved the issue.
If anyone else has the problem, it turns out that under the new update, .h files have to be included in .cpp files in a different order. E.g. Tank.h had to always be included in Tank.cpp last before, but now it must be included first. Hope this helps.

Privacy & Terms