Generate VS project files fails in 4.17

I need to recreate the VS project files, but it fails when using 4.17.
Mainly ‘Intermediate\ProjectFiles’ istn’t generated.

I can right click on the uproject file and switch the project to 4.16, which creates the files successfully, but I need 4.17

Is this a bug, or am I doing something wrong?

Try adding the code in this commit. It should be in 4.17.2.

https://github.com/EpicGames/UnrealEngine/commit/6cee781ddf47558c9a59908428e7372a33774341

I just ran into this right now. It was a pain because the window that pops up doesn’t stay open if there’s an error in the log, but to see what’s going on you can run the following command line:

[YourEnginePath]\Engine\Binaries\DotNET\UnrealBuildTool.exe -projectfiles -project="[YourFullyQualifiedProjectPath].uproject" -game -rocket -progress

This is the command line that gets run when you right click your uproject and generate project files. If you run this from a command line window you’ll be able to see the program’s output and try to fix the errors you’re getting. For me, some of the engine plugins I depended on for my 4.15 project had been renamed and this was preventing the project from being generated.