Not Finding GenerateProjectFiles.bat

Hey,
So I have been trying to delete a C++ class using a previous question’s answer:

The problem is that I cannot find the GenerateProjectFiles.bat. I installed UE through the Epic Games Launcher, and so I would assume my Root folder would be the engine folder. I go to Program Files → Epic Games → 4.9… but it I do not see it anywhere. Any help would be appreciated. Maybe I am not correct on what is the Root folder.

Thanks,

Hey -

Rather than running a batch file (.bat) as mentioned in step 4 of the other post, you can instead right click on the .uproject and choose “Generate Visual Studio project files”. This will update the project files and remove references to the class that you’ve deleted.

Cheers

Thanks, worked like a charm!

Anyone know how to find this file on the mac. Do I have to get the source from Github or is it possible to find it by downloading it via the Epic Games Launcher?

Hey cyborgdino-

Can you explain what exactly you’re attempting to do? Are you attempting to remove a class from your project as was? If you’re using the source version on a Mac then you’ll want to find the GenerateProjectFiles.command (rather than .bat) file in the folder where the engine was unzipped/installed to and run that. If you’re using the binary version and want to generate project files you can right click on the .uproject and choose “Generate XCode project.”

Hey! I dont’t have that option when I right click the .uproject file in visual studio. What should I do?

Hey Bora Semiz-

This option is available when right clicking on the .uproject in the project directory rather than inside Visual Studio itself.

Similarly to Bora Semiz, I don’t have the option “Generate Visual Studio project files” when right-clicking on the .uproject from the file explorer on Windows 10.

I don’t have a GenerateProjectFiles.bat file either. I’m running UE4.14, as installed from the Epic Games Launcher.

I’ve been trying to build a project cloned using git, but got the error “Could not be compiled. Try rebuilding from source manually,” which eventually led me here. The project builds fine on another Windows 10 machine, but not mine.

Hey NHouse-

If you’re using the engine from the launcher then the GenerateProjectFiles.bat won’t apply as that is used in relation to source built engines. Please try clicking on the dropdown arrow next to the engine version in the launcher and choose the Verify option to ensure all the engine files are setup properly. If you’re not seeing the option for Generate Visual Studio project files in the .uproject’s right click menu, please try right clicking and selecting the Open With… option. Here you should find available programs to open the file with. Try switching to the Unreal Engine - EpicGames, Inc. (blue icon) and see if the project can be compiled/opened then.

Thanks ,
There isn’t a verify option on the engine version dropdown; it only allows me to pick from the two versions (I have 4.13.2 and 4.14.0). I assume you are referring to the engine version dropdown menu on the Epic Games Launcher? It updated a week or so ago; that option may not be there anymore.
As for choosing Open With… to force it to run with Unreal Engine, I currently have it set up to use the 4.14 version of the Unreal Engine executable (black icon). The blue one is the 4.13 version. Neither works.

If you open the Launcher and go to the Library tab you should see all of the engine versions you have installed. If you click the dropdown arrow next to Launch for one of these versions, you should see the Verify option.

As for the Open With option, here is a screenshot of what I see when I choose Open With. Let me know if you have any similar options and/or provide a screenshot of what you see.

If you want to manually generate project files with a precompiled engine (acquired via Epic Games launcher, not Source) you can invoke UBT directly with the following arguments:

"%ProgramFiles%\Epic Games\UE_4.22\Engine\Binaries\DotNET\UnrealBuildTool.exe" -ProjectFiles -UsePrecompiled -Game "absolute\path\to\your\project\file.uproject"

(Replace the paths to the engine and project file with your own paths.)

2 Likes

“C:\Program Files\Epic Games\UE_5.1\Engine\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.exe” -game $PWD\ProjectName.uproject -VSCode

in UE5

1 Like

I’m trying to compile vscode workspace file just like you! I’ll try your command! The “-game” param must be the project path right?