Workaround tips for "Error Generating Visual Studio Project Files"

I just found a way to generate vs project until this is fixed.

If you are on Windows, create a .bat file and add this(Ps: For the first element, use the correct path to the UE5 installation):

“C:\Program Files\Epic Games\UE_5.0EA\Engine\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.exe” -projectfiles -project=“Path\To\Your\Project\YourGame.uproject” -game -rocket -progress

Double click on it and should be good

2 Likes

I’ve been banging my head against the wall for hours now trying to get my project to launch, never had issues upgrading all the way back from 4.4
I’ve manually disabled all 3rd party plugins in my .uproject, running vs 2019, dot net 5/3 installed from the other posts. VS works perfectly in UE4. The only C++ code is an empty dumby relic of the past

C:\Program Files\Epic Games\UE_5.0EA\Engine\Binaries\DotNET\UnrealBuildTool>UnrealBuildTool.exe -projectfiles -project=“C:\Users\pryde\Documents\UnrealProjects\UE5\ShadowWars\ShadowWars.uproject” -game -rocket -progress
ERROR: Unhandled exception: System.Exception: Unable to find project file based on argument "C:\Users\pryde\Documents\UnrealProjects\UE5\ShadowWars\ShadowWars.uproject"
          at UnrealBuildTool.GenerateProjectFilesMode.TryParseProjectFileArgument(CommandLineArguments Arguments, FileReference& ProjectFile) in d:\build\++UE5\Sync\Engine\Source\Programs\UnrealBuildTool\Modes\GenerateProjectFilesMode.cs:line 302
          at UnrealBuildTool.GenerateProjectFilesMode.Execute(CommandLineArguments Arguments) in d:\build\++UE5\Sync\Engine\Source\Programs\UnrealBuildTool\Modes\GenerateProjectFilesMode.cs:line 83
          at UnrealBuildTool.UnrealBuildTool.Main(String[] ArgumentsArray) in d:\build\++UE5\Sync\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.cs:line 565

I have also changed the path to the project and get the same error:
About to give up tbh.

C:\Program Files\Epic Games\UE_5.0EA\Engine\Binaries\DotNET\UnrealBuildTool>UnrealBuildTool.exe -projectfiles -project=“C:\Users\pryde\Documents\Projects\Five\ShadowWars\ShadowWars.uproject” -game -Engine -rocket -progress
ERROR: Unhandled exception: System.Exception: Unable to find project file based on argument "C:\Users\pryde\Documents\Projects\Five\ShadowWars\ShadowWars.uproject"

Update in this thread

It should be you forget to put quotes on your directory structure/path as Epic Games has a space in it :smiley:

“C:\Program Files\Epic Games\UE_5.0EA\Engine\Binaries\DotNET\UnrealBuildTool>UnrealBuildTool.exe” -projectfiles -project=“C:\Users\pryde\Documents\Projects\Five\ShadowWars\ShadowWars.uproject” -game -Engine -rocket -progress

every time I run the bat I get an empty file called UnrealBuildTool.exeö and nothing else.
iv even changed the directory names so they have no spaces and even then when launching the unreal build tool from cmd I get the same error.
example:
cd C:\Program Files\Epic Games\UE_5.0EA\Engine\Binaries\DotNET\UnrealBuildTool
UnrealBuildTool.exe -projectfiles -project=“C:\Users\pryde\Documents\Projects\Five\ShadowWars\ShadowWars.uproject” -game -Engine -rocket -progress
error Unable to find project file. its honestly very frustrating lol, iv been working on this project on and off since 4.4 and never encountered a problem upgrading like this.

are you putting quotes around the first part as well? as the Program Files and Epic Games part has a space you need quotes around the directory structure so it should be:

“C:\Program Files\Epic Games\UE_5.0EA\Engine\Binaries\DotNET\UnrealBuildTool
UnrealBuildTool.exe” -projectfiles -project=“C:\Users\pryde\Documents\Projects\Five\ShadowWars\ShadowWars.uproject” -game -Engine -rocket -progress