Generate Visual Studio Project Files from the Command Line
Right-clicking a .uproject in Explorer is the usual way to regenerate VS project files, but it can fail silently or use the wrong engine. The command-line approach is more reliable and works for both Launcher installs and source builds.
After adding new source files, changing module dependencies, or switching engine versions, you need to regenerate project files. The command-line method gives you explicit control over which engine is used.
Source Build (Perforce / GitHub)
GenerateProjectFiles.bat -project="C:\Path\To\Your\Project.uproject" -game -engineInstalled Build (Launcher)
Windows:
Engine\Build\BatchFiles\Build.bat -ProjectFiles -project="C:\Path\To\Your\Project.uproject" -game -engineMac:
Engine/Build/BatchFiles/Mac/Build.sh -ProjectFiles -project="/Path/To/Your/Project.uproject" -game -engineFlags Explained
- -game: includes game module targets (Editor, Game, Client, Server)
- -engine: includes engine source in the solution (needed if you are modifying engine code)
- -project: absolute path to the .uproject file
Associate .uproject with the Right Engine
If the right-click option is broken, find UnrealVersionSelector-Win64-Shipping.exe inside Engine/Binaries/Win64 and run it. It re-registers the .uproject file association with the current engine build.