Followed Official Install Instructions / Can't get 5.1.1 to create any C++ project without an error appearing / Blueprint Works / Happening on Friends Machine too

I’m on a fairly fresh windows 11 install, I tried to install VS2022, and UE5.1.1, I can create Blueprint projects, but any C++ initial project (the right choice, blank and templates) cause an error, and a fail.

I’ve searched various posts, suggesting to make sure SDK is installed (which I did) make sure the .dotnet is in the right location (not x86) make sure the path is set, suggestions like that.

I can install VS2019 and 5.0.3 with no issues, but I’d really like to use 5.1.1.

A friend on Windows 10, tried the exact same install and got the same exact errors, but with me being on the faster internet connection, I’m doing all the TS’ing to see why it’s not working.

It was from a YouTube tutorial that advised using C++ to create, using Blueprints, but having the C++ option.

I tried a blueprint create, and then tried adding a C++ class, but I got a error, telling me it failed, and needed rebuilding, then locks, going back to the launcher and trying to open the project (been calling them TestOne, TestTwo, etc, just for testing) gives me another error, telling me it’s be made in another version, but then fails to load in.

Can anybody help us?

I have access to the log output file on the crash, but the initial black box gives me

An error occurred while trying to generate project files.

Running C:/Program Files/Epic Games/UE_5.1/Engine/Build/BatchFiles/Build.bat  -projectfiles -project="D:/!MainRepository20xx/UnrealProjects/TestFour/TestFour.uproject" -game -rocket -progress
Running UnrealBuildTool: dotnet "..\..\Engine\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll" -projectfiles -project="D:/MainRepository20xx/UnrealProjects/TestFour/TestFour.uproject" -game -rocket -progress
Log file: C:\Users\troop\AppData\Local\UnrealBuildTool\Log_GPF.txt
Unhandled exception: System.Exception: Unable to find project file based on argument D:/MainRepository20xx/UnrealProjects/TestFour/TestFour.uproject
   at UnrealBuildTool.GenerateProjectFilesMode.TryParseProjectFileArgument(CommandLineArguments Arguments, ILogger Logger, FileReference& ProjectFile) in D:\build\++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\UnrealBuildTool\Modes\GenerateProjectFilesMode.cs:line 297
   at UnrealBuildTool.GenerateProjectFilesMode.Execute(CommandLineArguments Arguments, ILogger Logger) in D:\build\++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\UnrealBuildTool\Modes\GenerateProjectFilesMode.cs:line 78
   at UnrealBuildTool.UnrealBuildTool.Main(String[] ArgumentsArray) in D:\build\++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.cs:line 648

The log file error gives me this.

Log started at 05/01/2023 21:26:18 (2023-05-02T01:26:18Z)
Adding event matcher: CompileEventMatcher
Adding event matcher: LinkEventMatcher
Adding event matcher: MicrosoftEventMatcher
Adding event matcher: XoreaxEventMatcher
No config file at D:\zzSystemFolders\Documents\Unreal Engine\UnrealBuildTool\BuildConfiguration.xml
Configuration will be read from:
  C:\Users\troop\AppData\Roaming\Unreal Engine\UnrealBuildTool\BuildConfiguration.xml
    Registering build platform: UnrealBuildTool.AndroidPlatformFactory
Note: Android toolchain NDK r25b recommended
        Registering build platform: Android - buildable: False
    Registering build platform: UnrealBuildTool.IOSPlatformFactory
        Registering build platform: IOS - buildable: False
    Registering build platform: UnrealBuildTool.LinuxPlatformFactory
        Registering build platform: Linux - buildable: False
        Registering build platform: LinuxArm64 - buildable: False
    Registering build platform: UnrealBuildTool.MacPlatformFactory
    Registering build platform: UnrealBuildTool.TVOSPlatformFactory
    Registering build platform: UnrealBuildTool.WindowsPlatformFactory
Found Windows 10 SDK root at C:\Program Files (x86)\Windows Kits\10 (1)
Found Windows 10 SDK root at C:\Program Files (x86)\Windows Kits\10 (2)
Found Windows 10 SDK version 10.0.20348.0 at C:\Program Files (x86)\Windows Kits\10
Found Universal CRT version 10.0.20348.0 at C:\Program Files (x86)\Windows Kits\10
Found Windows 10 SDK version 10.0.22000.0 at C:\Program Files (x86)\Windows Kits\10
Found Universal CRT version 10.0.22000.0 at C:\Program Files (x86)\Windows Kits\10
Found Windows 10 SDK version 10.0.22621.0 at C:\Program Files (x86)\Windows Kits\10
Found Universal CRT version 10.0.22621.0 at C:\Program Files (x86)\Windows Kits\10
Win64 Installed SDK(s): MinVersion_Sdk=10.0.00000.0, MaxVersion_Sdk=10.9.99999.0, CurrentVersion_Sdk=10.0.22621.0, Version_AutoSdk=10.0.18362.0, CurrentVersion_AutoSdk=
        Registering build platform: Win64 - buildable: True
    Registering build platform: UnrealBuildTool.HoloLensPlatformFactory
Log file: C:\Users\troop\AppData\Local\UnrealBuildTool\Log_GPF.txt
Deleting old log file: C:\Users\troop\AppData\Local\UnrealBuildTool\Log_GPF-backup-2023.04.23-20.54.24.txt

Unhandled exception: System.Exception: Unable to find project file based on argument D:/MainRepository20xx/UnrealProjects/TestFour/TestFour.uproject
   at UnrealBuildTool.GenerateProjectFilesMode.TryParseProjectFileArgument(CommandLineArguments Arguments, ILogger Logger, FileReference& ProjectFile) in D:\build\++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\UnrealBuildTool\Modes\GenerateProjectFilesMode.cs:line 297
   at UnrealBuildTool.GenerateProjectFilesMode.Execute(CommandLineArguments Arguments, ILogger Logger) in D:\build\++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\UnrealBuildTool\Modes\GenerateProjectFilesMode.cs:line 78
   at UnrealBuildTool.UnrealBuildTool.Main(String[] ArgumentsArray) in D:\build\++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.cs:line 648
Unhandled exception: Exception: Unable to find project file based on argument D:/MainRepository20xx/UnrealProjects/TestFour/TestFour.uproject
   at UnrealBuildTool.GenerateProjectFilesMode.TryParseProjectFileArgument(CommandLineArguments Arguments, ILogger Logger, FileReference& ProjectFile) in D:\build\++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\UnrealBuildTool\Modes\GenerateProjectFilesMode.cs:line 297
   at UnrealBuildTool.GenerateProjectFilesMode.Execute(CommandLineArguments Arguments, ILogger Logger) in D:\build\++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\UnrealBuildTool\Modes\GenerateProjectFilesMode.cs:line 78
   at UnrealBuildTool.UnrealBuildTool.Main(String[] ArgumentsArray) in D:\build\++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.cs:line 648
WriteFileIfChanged() wrote 0 changed files of 0 requested writes.
Timeline:

[ 0.000]
[ 0.000](+0.234) <unknown>
[ 0.234]

Soooooo, turns out.

I was trying to create a project on my D drive.

I created the project in a different folder on my C drive, and it worked.

Go figure!

I also had this happen, and I tried to create the project on my D:/ drive.
After a bit, I figured out the cause was because I had a “!” character in my folder’s name, and it couldn’t find it.

The error that came out was pointing out that the path to “D:/GameDev/GameName” does not contain a .uproject file. But the actual folder name was “D:/!GameDev/GameName”. With the exclamation mark. Renaming the folder solved the issue.