Hello guys, I run into a known trouble with creating a c++ project.
I have searched here around, I found a few similar question but the solutions (in case they were there) didn’t fit my problem case.
The error log:
Running C:/Program Files/UnrealEngine4/Unreal Engine/4.8/Engine/Binaries/DotNET/UnrealBuildTool.exe -projectfiles -project=“S:/Documents/My work/C++/UnrealEngineCodeProjects/BeginnersUnluck/MyProject/MyProject.uproject” -game -rocket -progress
Discovering modules, targets and source code for game…
UnrealBuildTool Exception: ERROR: Failed to read environment variables from XML file: C:\Users\AppData\Local\Temp\tmp5C4.tmp
Visual studio version 2013 Ultimate.
Only VS12 environment variable is present, others are deleted.
The paths do not contain any spaces.
Blueprint project starts correctly.
Tried to delete tmpXXX.tmp files and .bat files from AppData\Local\Temp folder, didn’t help
Windows 8.1 SDK is up to date.
Hope to get some suggestions from u!
Thanks in advance!
Have you [checked out this post][1] on the forums? I posted a potential fix for this yesterday when I ran into issues with the PATH environment variable.
In short, try running the bat file that accompanies the tmp file, i.e run this in command prompt:
C:\Users\\AppData\Local\Temp\tmp5C4.tmp.bat
If you get any error that has a similar format to this, you might have a bad delimiter in the PATH environment variable (in my case, an extra quotation mark):
\Skype\Phone\ was unexpected at this time.
Results may vary - feel free to post the output of that command
You will have to look through your PATH variable, and look for any unusual characters, or odd numbers of quotation marks and then remove them (Here be dragons, make a copy of the PATH environment string before editing). For everyone’s reference, you an get to the path environment variable like so:
I have looked it all throughout and I could not spot any weird characters… However, the “&” sign looks weird to me, but i’m not sure…
This is it so far… No luck
And while I am constantly trying to re-create a C++ project over and over again to test my luck, I get always different *tmp file name in the error log.
Here is this nasty message:
I have tested something here. After performing all the suggested actions, including complete reinstall of all my VC components and visual studio itself, nothing started to work. As a gesture of the last hope I have removed engine version 4.8.1 and installed 4.7.6 instead. Everything worked as a charm. Apparently for my particular case this was the way to solve the problem. Either there is a big problem with 4.8 about reading environment variables or something is on my end, however I literally checked everything, well in case it was, the other engine version would not work as well. So, it’s closed for now. And thanks for help!
Hi , sorry for the late reply and sorry to hear! It could possibly be that pesky ampersand character (&) - but otherwise, I cannot see any extra delimiters within your PATH sys variable.
Did you try running the .bat file in a separate command prompt? It doesn’t matter if it’s a different bat file each time, UnrealBuildTool will autogenerate a new one each time
Just asking, since command prompt will usually spit out either the error, or in my case, the section after the offending delimiter
I have the exact same problem, 4.7.6 works fine, 4.8.3 does not compile C++ due to the same error. I was looking on github in the source file where I believe the error is generated, and it was last updated Jan 28. Not sure if it has changed since 4.7.6 (how can you check that?)
I assume you’ve found the location of the issue in the source of the Unreal Build Tool? You could just check out the 4.8 branch and do a diff with the same file on the 4.7 branch.