Unable to generate c++ projects file 4.9

VS2013 community,

using btw I use 10 on a home computer and it works there

, who had the same issue that you’ve reported, found another solution to generate project files by uninstalling his engine version (4.9.2)
and finding and removing the folder located in “C:\Program Files\Epic Games\4.9”. Can you try doing this and let me know if you’re able to create a new code project after removing the folder and reinstalling?

no luck here same error

Don’t know. The editor does not get any further than attempting to create the project when not run in admin mode. Additionally, when I open an existing project without running the program ‘as administrator’, attempting to create new classes fails with the same error. It did this prior to me installing VS 2015, by the way.

This is the last bit in the log when loading an existing project non-administrator and trying to create a new c++ class:
Running V:/Game Files (x86)/Epic Games/4.9/Engine/Binaries/DotNET/UnrealBuildTool.exe -projectfiles -project=“U:/Aaron/Documents/Unreal Projects/TestProject/TestProject.uproject” -game -rocket -progress
Discovering modules, targets and source code for game…
UnrealBuildTool Exception: ERROR: Failed to harvest environment variables

However, when I run the unrealbuiltool.exe on the command line with those arguments (as non-administrator) it completes successfully, so I suspect whatever is being called after that command is what is failing.

Sorry, that was a bad assumption: clearly the error says UnrealBuildTool Excpetion error, so while I can run it successfully on the command line without invoking run as… Unreal Engine editor cannot run the command without invoking run as…

This is the error message I see as well.

Hey and Mercury00-

Unfortunately we have been unable to identify the cause of the “failed to harvest” issue and have run out of possible ideas. If we are able find other solution options we will post here with what we discover. At this point I would suggest checking with other community members on the forums to see if anyone else has had a similar issue and found a solution.

Can you let me know if there’s some other critical but previously unstated system requirement? Any assumptions about system layout that aren’t explicit in the installation or running of the program? As a developer I don’t just click next when installing things and give my home address to facebook and such, and sometimes it’s useful to know something like “you must have python 2.7” or “You have to have your temp folder on the same drive as windows” and such.

The only ‘special’ requirement is that 4.10 Preview 2 requires Visual Studio 2015 however other versions should work fine with VS2013. The “failed to harvest environment variables” seems to point toward an issue with Visual Studio however this is only speculation. If you’ve already tried to uninstall/reinstall the editor then I would try to reinstall Visual Studio as well if you’ve not done so.

I’ll give 4.10 a shot and let you guys know how it goes, and i’ll try reinstalling again visual studio too to see if anything changes

Hi all, the past week I was having this problem too. Re-installed the engine, re-installed Visual Studio, checked the Path variable. Wouldn’t work, not in 4.9 or 4.10.

It turned out I had another second PATH variable in User Variables, as well as the one in System Variables, I deleted PATH from user variables and now everything is working fine

Thanks , thats was the answer my problem at least. the user path is interfering with the system path, what seems to be happening in my opinion is when the engine looks for the path it looks at the user PATH(which some how is the first one to be called?) ignores the system PATH variable. So if you have 2 PATHs one in user and one in System try deleting or renaming your User PATH , Thanks and for the help much appreciated! Remember delete or rename the USER PATH.

I ran into this same issue, but what is confusing to me is that my user PATH looked like so:

C:\Tc\Something;%PATH%

Now, shouldn’t it see the system path at this point, or is it completely weird? Nevertheless, I moved the first part to the system path, and all is working now.