Error switcing engine versions 4.7 -> 4.8

ERROR switching engine version:

Running C:/UE4SAUCE/UnrealEngine-release/Engine/Binaries/DotNET/UnrealBuildTool.exe -projectfiles -project="C:/Users/Fox/Documents/Unreal Projects/theproject/theproject.uproject" -game -engine -progress
Discovering modules, targets and source code for game...
Errors detected while compiling C:\Users\Fox\Documents\Unreal Projects\theproject\Intermediate\Build\BuildRules\theprojectProjectFileGeneratorModuleRules.dll:
c:\Users\Fox\Documents\Unreal Projects\theproject\Source\theprojectServer.Target.cs(32,45) : error CS0117: 'UnrealBuildTool.UnrealBuildTool' does not contain a definition for 'BuildingRocket'
UnrealBuildTool Exception: ERROR: UnrealBuildTool encountered an error while compiling source files

Error when trying to switch engine version on project file using github built engine, and binary launcher engine. Engine built with no errors.

  • another error when trying to load the project in visual studio:
    error : The project file could not be loaded. Could not find a part of the path ‘C:\UE4SAUCE\UnrealEngine-release\Engine\Source\Programs\Distill\Distill.csproj’. C:\UE4SAUCE\UnrealEngine-release\Engine\Source\Programs\Distill\Distill.csproj

Any help is appreciated!

Steps when building the source version:
Downloaded zip from github, extract zip, run setup, run generate project files, open visual studio, build the solution, build completed with no errors or warnings, start the editor, editor working, close editor, right click on project file and switch engine version, error.

Previously I was using the github source built 4.7.3

same error from binary build from launcher.

Hey -

I just want to make sure I understand what’s happening clearly. Your project was originally using 4.7.3 built from source and you had conversion issues when trying to convert the project to 4.8 built from source, correct? Do you get the same error when trying to convert a new project from 4.7 to 4.8? Also let me know if you are able to create a new project directly in 4.8.

Additionally with the engine solution open in VS you may want to try building the UnrealBuildTool in the Programs folder directly. Let me know if this helps or if you receive any other messages.

Cheers

Hi! Yes, My Project was originally using 4.7.3 source, and trying to switch the project to the new source built 4.8 engine generates this error. If I create a new FPS BP template project in 4.7.3 however, switching engine seems to work fine.
I can also create new projects in 4.8.

Rebuilding the UnrealBuildToo is succesfull, but makes no difference in trying to switch engine version on my project.
========== Rebuild All: 2 succeeded, 0 failed, 0 skipped ==========

My project that WONT switch engine version was originaly a FPS BP template with a multiplayer menu, and I had also previously follwed the guide for creating a dedicated server build for my project.

Only this project seems to generate this error.

Thanks for your assistance!

Hey -

The error message when opening the project in Visual Studios may be solved by regenerating the project files. This can be done by right clicking on the .uproject file and select the “Generate Visual Studio project files” option. I’m not sure if you’re seeing this error before or after you try to change the engine version however doing this after changing the engine version should allow the .sln to then be opened and compiled.

“Generate Visual Studio project files” results in the same error as trying to switch engine version.

EDIT: I cant really tell how, but it must have something to do with the dedicated server build things,

“theprojectServer.Target.cs(32,45) : error CS0117: ‘UnrealBuildTool.UnrealBuildTool’ does not contain a definition for ‘BuildingRocket’”

I dont understand how or why at the moment, but the error seems to point that way.

Line 32 in server.target.cs is:
if (UnrealBuildTool.UnrealBuildTool.BuildingRocket())

There may be a file in the project that is interferring with the process of switching versions. To narrow down which file it is you can try removing items (folders and files) from the project folder and then try changing the engine version again. If successful you can then put the items back in and convert again to find what is causing the problem.

Additionally, since this is only occurring on your project and you can create/convert new projects without issue, I don’t believe I will be able to reproduce the issue on my end. If possible could you send me your working 4.7.3 project and I can see what happens when I try to convert it to 4.8 on my end.

Cheers

You are correct… I just removed the server.target.cs file and the project converted without error, I could also now generate project files. The problem is as I suspected related to the dedicated server file, but why would this happen? this was not a problem with 4.7.

EDIT: If you create a project in 4.7 with a dedicated server build configuration, are you able to replicate this issue on your end?

Any updates?

Hey -

I was able to confirm that setting up a dedicated server is what is preventing the project from being able to convert to 4.8 successfully. As you pointed out, removing the files for the dedicated server does allow for the project to be converted. This has been bugged (UE-17542) for investigation. After removing the files and converting the project, were you able to replace the files for the dedicated server?

Cheers

Thanks for lookin into this, I really appreciate your support. I have not tried to redo the process of creating a dedicated server build for 4.8 yet.
Im out of town for the week but when I return I’ll post back with results asap!

regards

Hi again. I have now had time to do some more tests. After removing the server target file, the process for creating a dedicated server can not be replaced even after the project is converted to 4.8 or 4.8.1 or an error will occure. To elimiate the possibility of my project being the cause, I created a brand new blueprint project, added an empty C++ class to create source files for the project, refreshed the project code files from the editor with no error, but after adding a server target file the very same error will happen.

I am using this template for the server target as instructed in the documentation:

It seems that creating dedicated servers are broken in 4.8. This most recent test was done with the latest 4.8.1 github release.

Error from 4.8.1 with the fresh BP FPS project template, when attempting to refresh code project files from editor after adding server target:

Running C:/UE4/UnrealEngine-4.8.1-release/Engine/Binaries/DotNET/UnrealBuildTool.exe  -projectfiles -project="C:/Users/Fox/Documents/Unreal Projects/testgame/testgame.uproject" -game -engine -progress
Discovering modules, targets and source code for game...
Errors detected while compiling C:\Users\Fox\Documents\Unreal Projects\testgame\Intermediate\Build\BuildRules\testgameProjectFileGeneratorModuleRules.dll:
c:\Users\Fox\Documents\Unreal Projects\testgame\Source\testgameServer.Target.cs(8,12) : error CS1520: Method must have a return type
UnrealBuildTool Exception: ERROR: UnrealBuildTool encountered an error while compiling source files

and same error when trying to build in VS

Trying to refresh source code files from Master branch editor (2015-07-02) results in a slightly different yet familiar error:

Running C:/UE4/UnrealEngine-master/Engine/Binaries/DotNET/UnrealBuildTool.exe  -projectfiles -project="C:/Users/Fox/Documents/Unreal Projects/testgame/testgame.uproject" -game -engine -progress
Discovering modules, targets and source code for game...
Errors detected while compiling C:\Users\Fox\Documents\Unreal Projects\testgame\Intermediate\Build\BuildRules\testgameProjectFileGeneratorModuleRules.dll:
c:\Users\Fox\Documents\Unreal Projects\testgame\Source\testgameServer.Target.cs(32,45) : error CS0117: 'UnrealBuildTool.UnrealBuildTool' does not contain a definition for 'BuildingRocket'
UnrealBuildTool Exception: ERROR: UnrealBuildTool encountered an error while compiling source files

Any updates? Can this problem be replicated on your end?

Currently I am unable to creat a dedicated server by any means with 4.8+ builds.

Hey -

I updated the original bug I reported (UE-17542) to reflect that dedicated servers appear broken with 4.8 and 4.8.1. It appears that the BuildingRocket() function was removed in 4.8. The error is being caused when the this function is being called by the dedicated server Target.cs file.

Thanks for helping out! I’ll be on the lookout for updates, cheers!

Hi ,

The template for the Target.cs file on that wiki page was outdated, the BuildingRocket() function was removed in 4.8. I’ve updated the wiki to reflect this. Please try again with the updated template.

Hi Ryan! Thanks alot for updating. The new target.cs file works fine, and the server executable can now be built without errors. Im yet to succesfully deploy the server, but there are now no problems building it.

Thanks for your assistance!