Why do the Visual Studio projects not generate if I create a new project not in the default location?

I downloaded the source and compiled the Win64 UE4-Editor.exe. When I run the editor, I try creating a new project from the C++ First Person template. If I let the project get created in the default directory “Documents\Unreal Projects.…” its visual studio project files properly get generated. However if I generate the project in a different folder, such as on a different drive, the source code gets created but the visual studio projects do not get generated.

It’s not a fix but as a work around generating the Visual Studio files “manually” as suggested in this post worked for me.

This does fix the problem. Once they were generated, I wasn’t able to compile because of “couldn’t find target rules file”. I resolved this by placing a MyGames.uprojectdirs file in my /UnrealEngine folder. This file needs to have one line that specifies the folder that contains the folder for your game. In my case my TestGame project is located in /UnrealEngine/TestGame/TestGame.uproject, so in my uprojectdirs file I just added a single dot “.” to say it should search for folders that contain .uproject files in the /UnrealEngine directory.