Generating project files fails (UE4.8)


I’m working a plugin and have three separate folders for checkouts of the 4.6, 4.7, and 4.8 branches. Both 4.6 and 4.7 checkouts work just fine, however when I run GenerateProjectFiles.bat on a fresh 4.8 checkout (after running Setup.bat and installing the prerequisites of course), I get the following error:

Setting up Unreal Engine 4 project files...

Errors detected while compiling C:\Work\UnrealEngine48\Engine\Intermediate\Build\BuildRules\ProjectFileGeneratorModuleRules.dll: c:\Work\UnrealEngine48\Engine\Source\Runtime\Toolbox\Toolbox.Build.cs(5,14): error CS0101: The namespace 'global namespace>' already contains a definition for 'Toolbox'

c:\Work\UnrealEngine48\Engine\Plugins\Runtime\Steam\SteamVR\Source\SteamVR\SteamVR.Build.cs(5,15): error CS0101: The namespace 'UnrealBuildTool.Rules' already contains a definition for 'SteamVR'

UnrealBuildTool Exception: ERROR: UnrealBuildTool encountered an error while compiling source files
GenerateProjectFiles ERROR: UnrealBuildTool was unable to generate project files.

I did not get any errors when running Setup.bat and now I’m at a loss as what the problem could be. Could the other two checkouts interfere with my 4.8 checkout?

Hey -

Having multiple engine versions in separate locations should not cause any issues when building the engine. The messages about the namespace already containing a definition makes it sounds as though it’s trying to create the files that already exist. You may want to try creating a new folder to move the 4.8 branch to and then try running Setup.bat and GenerateProjectFiles.bat for 4.8 again in the new location.


Thank you for your response. I’ll try your suggestion very soon and post my results here.

I still find it strange because I simply did three identical GitHub checkouts to three different folders and just switched branches to 4.6, 4.7, and 4.8, and it’s only the 4.8 branch that is giving me this problem. If I get it working, I’ll post the exact steps I followed for others who might run into the same issue.

, you were right. I just did a clean checkout from github, switched to the 4.8 branch, ran Setup.bat and GenerateProjectFiles.bat, and now it’s compiling. I don’t what’s different compared to what I did before, but doing it again fixed my problem. Thanks again!