Editor
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.
visual-studioproject-filesbuildcommand-linesource
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)
bash
GenerateProjectFiles.bat -project="C:\Path\To\Your\Project.uproject" -game -engineInstalled Build (Launcher)
Windows:
bash
Engine\Build\BatchFiles\Build.bat -ProjectFiles -project="C:\Path\To\Your\Project.uproject" -game -engineMac:
bash
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
Tip: Create a batch file at the project root that calls this command. One double-click regenerates everything without needing to remember the syntax.
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.