Can't create a C++ project

When I try to create a C++ project it fails to create the project. This is the log it gives me after giving a prompt saying ‘an error occurred while trying to generate project files.’:

Running C:/Program Files/Epic Games/UE_5.3/Engine/Build/BatchFiles/Build.bat -projectfiles -project=“C:/Users/Bobby/Documents/Unreal Projects/asdf/asdf.uproject” -game -rocket -progress
set DOTNET_ROOT=%UE_DOTNET_DIR%

rem Disables use of any installed version of dotnet
set DOTNET_MULTILEVEL_LOOKUP=0

rem for dotnet applications that require older dotnet runtimes, this will allow them to use our bundled dotnet runtime
set DOTNET_ROLL_FORWARD=LatestMajor

rem skip dotnet verification when using our submitted sdk as we know it is up to date
ECHO Using bundled DotNet SDK version: %UE_DOTNET_VERSION%
Using bundled DotNet SDK version: 6.0.302
goto Succeeded
exit /B 0

There is nothing else that exists in the logs past this.

This also occurs when I try to build previous working C++ projects. Unreal gives the same log and exits the build immediately. The only difference is instead of calling build.bat, it runs the automation tool and gives this error:
LogTurnkeySupport: Completed device detection: Code = 255
LogTurnkeySupport: Warning: Turnkey failed to run properly, full Turnkey output:
Running AutomationTool…

I have installed all the different dotnet files, reinstalled and verified the engine, and reinstalled and verified required VS configurations.

Occurs in both engines of 5.3 and 5.4. (I really do not want to upgrade versions beyond this due to my current large project.)

I would really like to get this fixed. This first occurred beginning of this year and I have not found a solution. The only solution for me was to abandon development on my main workstation that this occurs on and use my laptop (no problems there).

So it works on your laptop but not on your desktop?

Could be some weird issue with Windows DLL priority or similar. I’ve had situations where the wrong versions of a DLL are loaded due to a registry entry made by a buggy package installer.

Maybe on your desktop try running under a debugger to trace the DLL loads:

You’d need to figure out the exact command line that the batch file is finally running and feed that into the CDB command line.

Or on your laptop maybe try using Process Explorer and looking for what gets loaded during the launch. See if there is something there that is either not installed or is being blocked by an AV or firewall setting.

Thank you for the help, it definitely lead me in the right direction. I used process explorer and process monitor to find that dotnet.exe was running during the project setup on my laptop but never initiated on my PC. I located the initial log message that I got to be from ‘getdotnetpath.bat’ and tracked how the code was called in that script. Apparently the script wasn’t starting dotnet.exe for some reason, and because I initially did not get any errors I decided to skip the entire script. Basically I just wrote ‘goto succeeded’ at the beginning of the file which skips all the dotnet path verification. I don’t know if this is the best thing to do, but hey, dotnet runs now and builds the project. We’ll see if it causes other problems in the future. Other than that, IDK if there was any registry problems, frankly I found going through process monitor very overwhelming.

1 Like