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.Text.StringBuilder.ToString()
at UnrealBuildTool.VCProjectFile.WriteProjectFile(List1 InPlatforms, List1 InConfigurations, PlatformProjectGeneratorCollection PlatformProjectGenerators, ILogger Logger) in D:\build++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\UnrealBuildTool\ProjectFiles\VisualStudio\VCProject.cs:line 1381
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
Not very helpful to the OP but I am also getting the same error when trying to create C++ projects in Unreal 5.1.
Actions taken with no results:
Upgrade Visual Studio to latest version of 2022
Changed Source Code preference in the editor to Visual Studio 2022
Tried to create both a Blank and Third Person C++ project
Confirmed it is not a physical memory issue
Same issue for me. Creating a new C++ project in 5.0 works fine but 5.1 throws ‘System.OutOfMemoryException’. 5.1 Blueprint project works fine as well.
I did a reinstall of Visual Studio and Unreal, redownloaded and installed the necessary packages but the issue still persists.
I was hoping that your solution would fix the issue for me, but it didn’t unfortunately.
Would you mind listing the following details of your install?
Visual Studio Version
Screenshot of all the components installed
Your Windows version
I’ve been trying to fix this issue for 1 week now, without success so far. It’s clearly a dependency that’s missing, most probably related to a .NET component, but I can’t find the missing one.
What I have tried so far:
Clean install and attempt with VS 2019 and also 2022 and following the 5.1 Visual Studio setup documentation page. Clean install of the engine. Same error. I even tried on another computer that never had Unreal Engine or VS installed on.
When I was trying to fix the issue I noticed, that my .NET was installed in C:\programs\dotnet and i still had an old sdk version in C:\programs (x86)\dotnet.
I then copied the newer sdk over.
Maybe that will fix the problem for you aswell.
It’s working. I did not install or remove anything from my current configuration but like you, I also had another install of .NET in C:\programs (x86)\dotnet. Copied the newest install over this one and now it works. Something is wrong with the installation process then.
Same problem. I can only open a 5.1.1 project in BP. A C++ project throws an exception: Unhandled exception: System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
Win10, VS2019.
Where can I find the .NET SDK you are copying over?
I have:
C:\Program Files (x86)\dotnet\sdk\3.1.409
A:\Software\Epic\UE_5.1\Engine\Binaries\ThirdParty\DotNet\6.0.302\{etc}