How to create a Generate Project Files shortcut for a 5.4 project?

I’m trying to make a shortcut that generates my project files. This was easy in 5.3, I just did what the Registry says the Generate Project Files right-click option did. But in 5.4, this does two things differently:

  1. Asks me to select a version
  2. After I hit ok, it tells me “Couldn’t set association for project. Check the file is writeable.”

It’s weird that this changed in 5.4. 5.3 projects continue to work, but everything I’ve tried has failed for the 5.4 project.

Looking at the registry, the Generate Project Files option runs this command:

“C:\Program Files (x86)\Epic Games\Launcher\Engine\Binaries\Win64\UnrealVersionSelector.exe” /projectfiles “%1”

Which is what I’ve been doing, replacing the %1 with the path to my uproject file. I’ve tried also setting the shortcut’s Start In to the project folder vs the launcher path, but that doesn’t change results.

I’ve also tried writing a batch file, but to the same end.

"C:\Program Files (x86)\Epic Games\Launcher\Engine\Binaries\Win64\UnrealVersionSelector.exe" /projectfiles "C:\dev\example-path-to-project.uproject"

I’m really not sure what to do here. :confused: This all continues to work for my 5.3 projects, but something is special with 5.4 that makes it weirdly hostile to my efforts. Somehow the right-click Generate Project Files is doing something subtly different that makes it work, and I’m not sure what that is.

Has anyone gotten this to work for a UE 5.4 project?

1 Like

We figured out what was wrong. It was two things.

  1. When we transitioned to 5.4, someone on the team renamed the project by a single letter, and I hadn’t noticed. Instead of giving me an error message explaining it couldn’t find the file, it just popped up the version selector dialog. The solution below gave me the feedback I needed to fix that, and now the batch file and windows shortcut work by the standard version selector means.
  2. The automated build process we set up on Jenkins was still failing to generate project files by the means above, but the solution below DOES work for it. It’s a direct call that runs in the DOS window, instead of using the UnrealVersionSelector (which pops up a gui and apparently had other nebulous problems on Jenkins).

Replace stuff in < and > with your own path and project.

cd C:\dev\<workspace_name>\
"C:\Program Files\dotnet\dotnet.exe" "C:\Epic Games\UE_5.4\Engine\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll" -projectfiles -project="C:\dev\<workspace_name>\<project_name>.uproject" -game -rocket -progress

This manual call to dotnet.exe to run UnrealBuildTool.dll gives solid feedback if there’s a problem, and doesn’t seem to barf chunks when run by our automated build tool. I hope this helps someone!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.