I just tried to create a new C++ test project based on the ThirdPerson example project and received the error below. Please note that I can create new C++ projects in 4.27.2 and 5.0.3 on this PC without any issues.
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="C:/Projects/PerforceDepot/ThirdPersonTest/ThirdPersonTest.uproject" -game -rocket -progress
Running UnrealBuildTool: dotnet "..\..\Engine\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll" -projectfiles -project="C:/Projects/PerforceDepot/ThirdPersonTest/ThirdPersonTest.uproject" -game -rocket -progress
Log file: C:\Users\sascha\AppData\Local\UnrealBuildTool\Log_GPF.txt
Some Platforms were skipped due to invalid SDK setup: IOS, Android, Linux, LinuxArm64.
See the log file for detailed information
Discovering modules, targets and source code for project...
Binding IntelliSense data...
Binding IntelliSense data... 100%
Writing project files...
Writing project files... 0%
Unhandled exception: System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
at System.GC.AllocateNewArray(IntPtr typeHandle, Int32 length, GC_ALLOC_FLAGS flags)
at System.GC.<AllocateUninitializedArray>g__AllocateNewUninitializedArray|66_0[T](Int32 length, Boolean pinned)
at System.Text.StringBuilder.ExpandByABlock(Int32 minBlockCharCount)
at System.Text.StringBuilder.Append(Char* value, Int32 valueCount)
at System.Text.StringBuilder.AppendHelper(String value)
at System.Text.StringBuilder.Append(String value)
at UnrealBuildTool.VCProjectFile.AppendIncludePaths(StringBuilder Builder, IncludePathsCollection Collection, HashSet`1 IgnorePaths) in D:\build\++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\UnrealBuildTool\ProjectFiles\VisualStudio\VCProject.cs:line 825
at UnrealBuildTool.VCProjectFile.WriteProjectFile(List`1 InPlatforms, List`1 InConfigurations, PlatformProjectGeneratorCollection PlatformProjectGenerators, ILogger Logger) in D:\build\++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\UnrealBuildTool\ProjectFiles\VisualStudio\VCProject.cs:line 1251
at UnrealBuildTool.ProjectFileGenerator.WriteProjectFiles(PlatformProjectGeneratorCollection PlatformProjectGenerators, ILogger Logger) in D:\build\++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\UnrealBuildTool\ProjectFiles\ProjectFileGenerator.cs:line 2812
at UnrealBuildTool.VCProjectFileGenerator.WriteProjectFiles(PlatformProjectGeneratorCollection PlatformProjectGenerators, ILogger Logger) in D:\build\++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\UnrealBuildTool\ProjectFiles\VisualStudio\VCProjectFileGenerator.cs:line 480
at UnrealBuildTool.ProjectFileGenerator.GenerateProjectFiles(PlatformProjectGeneratorCollection PlatformProjectGenerators, String[] Arguments, ILogger Logger) in D:\build\++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\UnrealBuildTool\ProjectFiles\ProjectFileGenerator.cs:line 1176
at UnrealBuildTool.GenerateProjectFilesMode.Execute(CommandLineArguments Arguments, ILogger Logger) in D:\build\++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\UnrealBuildTool\Modes\GenerateProjectFilesMode.cs:line 233
at UnrealBuildTool.UnrealBuildTool.Main(String[] ArgumentsArray) in D:\build\++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.cs:line 648
Having the same issue. I posted the issue in the 5.1 Release Announcement thread, but no one has replied so far. Glad to have confirmation that Iâm not the only one having this issue.
This topic has been moved from international to Programming & Scripting: C++.
When posting, please review the categories to ensure your topic is posted in the most relevant space. Hopefully, the category change of this topic will help to get you answers or help others in the future.
Thanks so much for being a part of the Unreal Engine community!
-Panda
These install settings are based on the official documentation for 5.1 and with this install, I am able to create new 5.0 C++ projects and generate project files. But I get the crash for 5.1.
In case you get an error code 6 from VS 2019, check that you have installed all the required tools, given by the docs:
Verify the tools below are installed:
C++ profiling tools
C++ AddressSanitizer
Windows 10 SDK (10.0.18362 or Newer)
Unreal Engine installer"
You can check by open âVisual Studio Installerâ and go to the tab âWorkloadsâ and then select âDesktop Development with C++â (naming may be a little bit different).
In my case Windows 10 SDK (10.0.18362 or Newer) was not installed by default when I installed VS 2019.
I just had to install the Windows 10 SDK and then I restarted my computer. Also, check that you have enough disk space in your C:/user/username/AppData/UnrealEngine (or just C:/ drive)
After doing this, I was able to setup a fresh (empty) C++ project in UE 5.1.
None of the fixes worked for me. With engine version 5.03 everything works fine, but with 5.1 it can create only blueprint projects. As soon as c++ project template is chosen it keeps giving this error. Iâve tried to add also a c++ class into a blueprint project but still fails and says it cannot compile. I have every tool listed in 5.1 release notes and still do not understand why it fails. Does somebody else have the same issue or maybe resolved it already?
This is the error message on project creation:
Running P:/UE_5.1/Engine/Build/BatchFiles/Build.bat -projectfiles -project=âC:/Users/user/Documents/Unreal Projects/MyProject6/MyProject6.uprojectâ -game -rocket -progress
The system cannot find the path specified.
Running UnrealBuildTool: dotnet ââŚ..\Engine\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dllâ -projectfiles -project=âC:/Users/user/Documents/Unreal Projects/MyProject6/MyProject6.uprojectâ -game -rocket -progress
Log file: C:\Users\user\AppData\Local\UnrealBuildTool\Log_GPF.txt
Some Platforms were skipped due to invalid SDK setup: Android, Linux, LinuxArm64.
See the log file for detailed information
@henrihaka1
It could definitely be a .NET Core issue. My best solution for this is to either update it usually, but I noticed on mine that my .NET was installed in C:\programs\dotnet and I still had an old SDK version in C:\programs (x86)\dotnet, and copied the newer SDK over.
I hope this can help you, this seems to be a common issue!
-Zen
Unfortunatelly I tried that too. I seriously do not get why it is happening. I event tried in my linux machine and there works without a problem. I am currently trying to build the engine from source code right now and hope it works like that but I seriously doubt that. Maybe later I will attach my VS2022 individual componenets so somebody more skilled than me can catch where the error might be.
Thanks for your repply anyway!
Unfortunatelly I still have no luck. For any other unlocky guy like me a temporary workaround (that actally works for me) might be to create your project manually and build from cmd P:\UE_5.1\Engine\Build\BatchFiles\Build.bat MyProjectEditor Win64 Development -Project=âC:\Users\user\Desktop\ueProject\myProject\myProject.uprojectâ -WaitMutex -FromMsBuild