Crash upon creating new project

This is the error I get when I first try to create a C++ project in UE5.1.
The project could not be compiled. Would you like to open it in Visual Studio?

Running C:/Program Files/Epic Games/UE_5.1/Engine/Build/BatchFiles/Build.bat Development Win64 -Project=“C:/Users/thebe/Documents/Unreal Projects/BeginnerRun/BeginnerRun.uproject” -TargetType=Editor -Progress -NoEngineChanges -NoHotReloadFromIDE
Running UnrealBuildTool: dotnet “…..\Engine\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll” Development Win64 -Project=“C:/Users/thebe/Documents/Unreal Projects/BeginnerRun/BeginnerRun.uproject” -TargetType=Editor -Progress -NoEngineChanges -NoHotReloadFromIDE
Log file: C:\Users\thebe\AppData\Local\UnrealBuildTool\Log.txt
Creating makefile for BeginnerRunEditor (no existing makefile)
Unable to instantiate module ‘SwarmInterface’: Could not find NetFxSDK install dir; this will prevent SwarmInterface from installing. Install a version of .NET Framework SDK at 4.6.0 or higher.
(referenced via Target → Launch.Build.cs → SessionServices.Build.cs → Core.Build.cs → Virtualization.Build.cs → SourceControl.Build.cs → RenderCore.Build.cs → RHI.Build.cs → D3D11RHI.Build.cs → Engine.Build.cs → UnrealEd.Build.cs)

This error message is indicating that the Unreal Engine is unable to find the .NET Framework SDK version 4.6.0 or higher. The error message is related to the SwarmInterface module, which is a module that allows for distributed compiling of C++ code.

To resolve this issue, you will need to install the .NET Framework SDK version 4.6.0 or higher on your machine. You can download the .NET Framework SDK from the Microsoft website.

Once you have installed the .NET Framework SDK, you might need to update the environment variables on your machine to point to the correct installation location of the SDK.

Here are the steps for Windows 10:

  1. Press Win + X and select System.
  2. Click on Advanced system settings.
  3. Click on Environment Variables.
  4. Under System Variables, scroll down and find the Path variable.
  5. Click on Edit.
  6. Click on New and enter the path to the .NET Framework SDK (e.g. “C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6 Tools”).
  7. Click OK to close all the windows.