# 5.1 Error when creating new C++ template project

**URL:** <https://forums.unrealengine.com/t/5-1-error-when-creating-new-c-template-project/691932>\
**Category:** C++\
**Tags:** unreal-engine, UE5-0, CPP, question\
**Created:** [November 16, 2022, 11:20am UTC](https://forums.unrealengine.com/t/5-1-error-when-creating-new-c-template-project/691932 "2022-11-16T11:20:36Z")\
**Posts on this page:** 9\
**Page:** 2

<div class="post-metadata">

**Author:** ![vinys](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@vinys](https://forums.unrealengine.com/u/vinys)\
**Post date:** [December 17, 2022, 12:46am UTC](https://forums.unrealengine.com/t/5-1-error-when-creating-new-c-template-project/691932/21 "2022-12-17T00:46:59Z")

</div>

Something similiar here, when i try to create a blank c++ project in UE 5.1 or to convert a c++ project from UE 5.0.3.

 ![screenshot](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/d/4/fd42a5418a4efab54ae862284a3bd997fb04baa7.png)

---

<div class="post-metadata">

**Author:** ![vinys](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@vinys](https://forums.unrealengine.com/u/vinys)\
**Post date:** [December 17, 2022, 9:30am UTC](https://forums.unrealengine.com/t/5-1-error-when-creating-new-c-template-project/691932/22 "2022-12-17T09:30:34Z")

</div>

Solved by moving "c:\Program Files\dotnet" above "c:\Program Files (x86)\dotnet" for the “Path”-environment variable.

---

<div class="post-metadata">

**Author:** ![ZAPATlSTA](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ZAPATlSTA](https://forums.unrealengine.com/u/ZAPATlSTA)\
**Post date:** [December 19, 2022, 4:06pm UTC](https://forums.unrealengine.com/t/5-1-error-when-creating-new-c-template-project/691932/23 "2022-12-19T16:06:33Z")

</div>

Problem still persists for me.

I’m getting the **System.OutOfMemoryException**.

I have 64 GB of memory and plenty of storage.

I’m able to create C++ Projects in 5.0.3 without any issues; but cannot do so in 5.1 for some reason. Also cannot create C++ plugins in 5.1 either.

Did everything in this thread.

---

<div class="post-metadata">

**Author:** ![GETXUTXFMYWAY](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@GETXUTXFMYWAY](https://forums.unrealengine.com/u/GETXUTXFMYWAY)\
**Post date:** [December 22, 2022, 3:21am UTC](https://forums.unrealengine.com/t/5-1-error-when-creating-new-c-template-project/691932/24 "2022-12-22T03:21:13Z")

</div>

Same here, only got some messages that there are problems in some .cs files in location D:\build… but the problem is that i dont have any of those folders on D: as well as none of other fixes work too so i just dont know what to do, i guess i will just wait till next update hoping it will be patched

---

<div class="post-metadata">

**Author:** ![Chybsik](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Chybsik](https://forums.unrealengine.com/u/Chybsik)\
**Post date:** [January 8, 2023, 12:09am UTC](https://forums.unrealengine.com/t/5-1-error-when-creating-new-c-template-project/691932/25 "2023-01-08T00:09:47Z")

</div>

Hi, also thought nothing was helping me but this is how i managed it to work:

- Make sure you installed all the Visual Studio components pointed out in this updated documentation: [Setting Up Visual Studio Development Environment for C++ Projects in Unreal Engine | Unreal Engine 5.1 Documentation](https://docs.unrealengine.com/5.1/en-US/setting-up-visual-studio-development-environment-for-cplusplus-projects-in-unreal-engine/)
- Only after all the things are installed delete folder “c:\Program Files (x86)\dotnet” and replace with “c:\Program Files\dotnet”

---

<div class="post-metadata">

**Author:** ![user131](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@user131](https://forums.unrealengine.com/u/user131)\
**Post date:** [January 17, 2023, 8:09am UTC](https://forums.unrealengine.com/t/5-1-error-when-creating-new-c-template-project/691932/26 "2023-01-17T08:09:48Z")

</div>

我这边也遇到了这样的问题，在试过很多的方法之后，发现核心问题好像，[是.Net](http://xn--0iv.Net) Core 3.1 没有安装。前面根据网友的提示，改了很多，也没用，也是因为VS Installer版本太高，导致.NetCore 3.1 已经不支持了，所以如果遇到这种情况，可以回退版本去安装。

---

<div class="post-metadata">

**Author:** ![davicito0081](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@davicito0081](https://forums.unrealengine.com/u/davicito0081)\
**Post date:** [February 16, 2023, 8:23am UTC](https://forums.unrealengine.com/t/5-1-error-when-creating-new-c-template-project/691932/27 "2023-02-16T08:23:28Z")

</div>

thanks man, it worked!

---

<div class="post-metadata">

**Author:** ![Ryo\_Lq](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ryo_lq/32/575321_2.png) [@Ryo\_Lq](https://forums.unrealengine.com/u/Ryo_Lq)\
**Post date:** [May 1, 2023, 9:25pm UTC](https://forums.unrealengine.com/t/5-1-error-when-creating-new-c-template-project/691932/28 "2023-05-01T21:25:33Z")

</div>

hey man did you get any fix. I have the same exact issue with you. I have no D: drive and Build folder. Im going to crazy. I installed every SDKs and environments but still no luck

---

<div class="post-metadata">

**Author:** ![Shockwave-X769](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/shockwave-x769/32/627017_2.png) [@Shockwave-X769](https://forums.unrealengine.com/u/Shockwave-X769)\
**Post date:** [June 10, 2023, 12:08am UTC](https://forums.unrealengine.com/t/5-1-error-when-creating-new-c-template-project/691932/29 "2023-06-10T00:08:09Z")

</div>

In my case I had also no luck just doing what I did here. Then I remembered that I had uninstalled VS 2017 and then I opened up VS 2019 and realized that some components was not installed in VS 2019 even though I had ticked them off back then in VS 2022. The reason for this seems to be that when removing VS 2017 it also removed those needed .NET and SDK files. As I modified the installed VS 2019 version to also included the shown options above after having verified my UE5.1 installation my VS 2022 suddenly worked again and instantly prop me for installing the VS integration plugin as well.

In worst case then reinstall all VS versions as well as verify the UE5 engine. Hope this works out.

[Previous page](https://forums.unrealengine.com/t/5-1-error-when-creating-new-c-template-project/691932.md?page=1)
