'dotnet' is not recognized as an internal or external command (UE5 Preview 2)

Whenever I try to click “Platforms->Windows->‘MY_PC’S_NAME’->Update Device” in the UE5 Editor it says “Installing SDK failed” and I get the following Console Log output:

LogMonitoredProcess: Running Serialized UAT: [ cmd.exe /c ""C:/Program Files/Epic Games/UE_5.0/Engine/Build/BatchFiles/RunUAT.bat" -ScriptsForProject="C:/Users/edins/Documents/Unreal Projects/MyProject/MyProject.uproject" Turnkey -command=VerifySdk -UpdateIfNeeded -platform=Windows  -Device=Windows@DESKTOP-B0FALN9 -EditorIO -EditorIOPort=51898  -noturnkeyvariables -utf8output -WaitForUATMutex" -nocompile ]
UATHelper: Installing Sdk (Windows): Running AutomationTool...
UATHelper: Installing Sdk (Windows): 'dotnet' is not recognized as an internal or external command,
UATHelper: Installing Sdk (Windows): operable program or batch file.
UATHelper: Installing Sdk (Windows): BUILD FAILED

What I don’t understand is why it doesn’t recognize ‘dotnet’ as a command. Epic says that UE5 has the dotnet binary comes with the UE5 install and exists locally in the “C:\Program Files\Epic Games\UE_5.0\Engine\Binaries\ThirdParty\DotNet\Windows” folder so that you don’t need to install DotNet yourself.

If I run the “GetDotnetPath.bat” file in “C:\Program Files\Epic Games\UE_5.0\Engine\Build\BatchFiles” it says that it is using the local “built-in” DotNet binary that comes with UE5 (meaning “all is well”) but I still get the error in the console.

I know I am not the only one with this issue but every solution to the problem that I’ve seen is to either install the DotNet runtime on your machine (globally) or to change the path of the “DOTNET_ROOT” environment variable. While first solution works, it is not a proper solution since you are meant to be able to use the dotnet binary that comes with the UE5 install (therefore I refuse to do it, since it it just a “dirty workaround”). I cannot do the second solution since I have no idea what the “DOTNET_ROOT” environment variable is or where I can find it. If I look in the environment variable list in Windows (https://www.computerhope.com/issues/pictures/win10-envirvariables.jpg) it is nowhere to be seen (???).

Can anyone clarify for me where I can find “DOTNET_ROOT” and how I can modify it or see it’s current value?

I also tried adding the dotnet binary location (C:\Program Files\Epic Games\UE_5.0\Engine\Binaries\ThirdParty\DotNet\Windows) to my global environment path variable in Windows but it did absolutely nothing. Wtf?

Does anyone here have a proper solution to this problem? I feel like I am making it harder than it’s supposed to be…



Hey, my browser cannot open this website. Could you please describe the solution here, if available ?

1 Like

I found the issue was that I was trying to run the batch file in Powershell, you have to run in the CMD for it to work.

1- just download Net Core 3.1

2- restart Epic game


Went through at least 15-20 articles and vids , nothing worked , this comment just saved the day


If an environment variable isn’t in the list, you can just add it by pressing “New…” under System Variables. That’s normally what you should do if something tells you to change an environment variable that isn’t there.

I think DOTNET_ROOT works like an override for whatever default Unreal thinks it should use. If not set (missing from the list), Unreal falls back to the default (or fails).

I have not tried the DOTNET_ROOT option, I solved the problem by using the Visual Studio Installer - I pressed “Modify…” under Visual Studio 2019, checked “.NET desktop development”, and pressed “Modify”. I had to restart Unreal Engine and maybe the Epic Games launcher. This probably does the same thing as 6m6m’s answer, but probably installs some extra stuff.

I had the same error message when trying to generate visual studio project files/compile from an old UE4 project into UE5.

This fixed it for me:
In visual studio I had already installed Dotnet runtime 3.1, but in CMD the “dotnet” command was not recognized. So I went to the link @anonymous_user_6a2fb347 posted and reinstalled dotnet 3.1. Now it shows correctly in CMD and I no longer get the error.

Just ran into this issue.

When the build.bat runs it calls GetDotNetPath.bat which finds the correct dotnet binary but it doesn’t save this path in anyway.

So later when build.bat calls dotnet it uses the Path environment variable.

The easiest fix for this is to add the dotnet binary location to the environment path variable, like you did. But then you have todo a restart.

Without restarting it will continue to fail even though if run dotnet on the commandline it works.

hope that helps

6.0.0 worked for me.

1 Like

This, 3.0 does not work anymore for me. Only 6.0

i cant get .NET core its discontinued

Ran into this with UE 5.1 and Visual Studio Community 2022 when following this link:

When adding “Workloads” with the VS installer, make sure that you include “.NET desktop development” and under the list of install items, enable “.NET Framework 4.8.1 development tools”. This added ‘dotnet’ to my path automatically without having to install the framework manually. I am assuming that the patch might fix the issue with ‘dotnet’ not being found.

1 Like

Thank you. This fixed it for me when attempting to generate project files for an older project migrated to 5.1


Which one? Microsoft allows us to download these types:
SDK 3.1.426
.NET Desktop Runtime
.NET Runtime

I first downloaded .NET Core 3.1 Desktop Runtime and it I still got the error when shipping the project. I then downloaded .NET Core SDK and it looks like it’s shipping the project.

Thank you lifesaver! Installing this through the Visual Studio Installer and setting environment variables did not work, still got the error. Manual installation through your link did. No more error