Build Error on GenerateProjectFiles

Trying to build the engine with Substance Plugin iteration. Here’s what I did:

  1. Downloaded the source from https://github.com/Allegorithmic/UnrealEngine/tree/4.11-substance_plugin
  2. Run the setup.bat - All dependencies download completed successfully
  3. Run GenerateProjectFiles.bat

Got the errors below:

Setting up Unreal Engine 4 project files...
Forcing Visual Studio max version to 2013 projects for Android compatibility (use '-2015' to override.)
Messages while compiling K:\UnrealEngine-release-4.11\Engine\Intermediate\Build\BuildRules\UE4Rules.dll:
k:\UnrealEngine-release-4.11\Engine\Source\Developer\iOS\MetalShaderFormat\MetalShaderFormat.Build.cs(5,14) : error CS0101: The namespace '<global namespace>' already contains a definition for 'MetalShaderFormat'
k:\UnrealEngine-release-4.11\Engine\Source\Runtime\FriendsAndChat\FriendsAndChat.Build.cs(5,14) : error CS0101: The namespace '<global namespace>' already contains a definition for 'FriendsAndChat'
k:\UnrealEngine-release-4.11\Engine\Source\Runtime\ImageCore\ImageCore.Build.cs(5,14) : error CS0101: The namespace '<global namespace>' already contains a definition for 'ImageCore'
k:\UnrealEngine-release-4.11\Engine\Source\Runtime\ImageWrapper\ImageWrapper.Build.cs(5,14) : error CS0101: The namespace '<global namespace>' already containsa definition for 'ImageWrapper'
k:\UnrealEngine-release-4.11\Engine\Source\Runtime\IOS\MetalRHI\MetalRHI.Build.cs(5,14) : error CS0101: The namespace '<global namespace>' already contains a definition for 'MetalRHI'
k:\UnrealEngine-release-4.11\Engine\Source\Runtime\SessionMessages\SessionMessages.Build.cs(5,15) : error CS0101: The namespace 'UnrealBuildTool.Rules' already contains a definition for 'SessionMessages'
k:\UnrealEngine-release-4.11\Engine\Source\Runtime\SessionServices\SessionServices.Build.cs(5,14) : error CS0101: The namespace '<global namespace>' already contains a definition for 'SessionServices'
k:\UnrealEngine-release-4.11\Engine\Source\Runtime\SynthBenchmark\SynthBenchmark.Build.cs(5,15) : error CS0101: The namespace 'UnrealBuildTool.Rules' already contains a definition for 'SynthBenchmark'
k:\UnrealEngine-release-4.11\Engine\Plugins\Runtime\TwitchLiveStreaming\Source\ThirdParty\Twitch\Twitch.Build.cs(7,14) : error CS0101: The namespace '<global namespace>' already contains a definition for 'Twitch'
k:\UnrealEngine-release-4.11\Engine\Plugins\ScriptPlugin\Source\ScriptGeneratorPlugin\ScriptGeneratorPlugin.Build.cs(7,15) : error CS0101: The namespace 'UnrealBuildTool.Rules' already contains a definition for 'ScriptGeneratorPlugin'
UnrealBuildTool Exception: ERROR: UnrealBuildTool encountered an error while compiling source files

GenerateProjectFiles ERROR: UnrealBuildTool was unable to generate project files.

Press any key to continue . . .

I’m on Windows 7 64bit, Visual Studio 2013 express edition.
Within these spec, I have built 4.1, 4.3, 4.4, 4.6, 4.7, 4.9 all those versions (without substance plugin) last time without any error.

Hello,

I have run through this process, and have not had any issue with Generate Project Files.

Take a look at this Answerhub post: https://answers.unrealengine.com/questions/250061/generating-project-files-fails-ue48.html

It sounds like your error is related to attempting to create files that already exist. Try creating a new folder or moving the folder to a new drive or directory and then running through Setup and Generate Project Files again.

Have a great day

You’re right. Removing some duplicate files fixed that problem. But now getting error on build in Visual Studio.

Please create a new Answerhub post for the build error you are experiencing and include the error message(s) that you are seeing in that post, as this issue seems to be unrelated to the original post. Thank you.

Have a great day

Deleting my Intermediate folder fixed this issue for me.

Worked for me, thanks!