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

**URL:** <https://forums.unrealengine.com/t/dotnet-is-not-recognized-as-an-internal-or-external-command-ue5-preview-2/505622>\
**Category:** World Creation\
**Tags:** unreal-engine, UE5-0, UE4-27, question\
**Created:** [March 10, 2022, 10:38am UTC](https://forums.unrealengine.com/t/dotnet-is-not-recognized-as-an-internal-or-external-command-ue5-preview-2/505622 "2022-03-10T10:38:01Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![Schytheron](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Schytheron](https://forums.unrealengine.com/u/Schytheron)\
**Post date:** [March 10, 2022, 10:38am UTC](https://forums.unrealengine.com/t/dotnet-is-not-recognized-as-an-internal-or-external-command-ue5-preview-2/505622/1 "2022-03-10T10:38:02Z")

</div>

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:

```auto
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](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…

Thanks!

---

<div class="post-metadata">

**Author:** ![Digitalp2k](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/digitalp2k/32/499599_2.png) [@Digitalp2k](https://forums.unrealengine.com/u/Digitalp2k)\
**Post date:** [June 24, 2022, 9:46pm UTC](https://forums.unrealengine.com/t/dotnet-is-not-recognized-as-an-internal-or-external-command-ue5-preview-2/505622/3 "2022-06-24T21:46:35Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_c708d62c1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_c708d62c1](https://forums.unrealengine.com/u/anonymous_user_c708d62c1)\
**Post date:** [July 13, 2022, 2:15am UTC](https://forums.unrealengine.com/t/dotnet-is-not-recognized-as-an-internal-or-external-command-ue5-preview-2/505622/4 "2022-07-13T02:15:15Z")

</div>

1- just download Net Core 3.1

> **[Download .NET Core 3.1 (Linux, macOS, and Windows)](https://dotnet.microsoft.com/en-us/download/dotnet/3.1)**
>
> .NET Core 3.1 downloads for Linux, macOS, and Windows. .NET is a free, cross-platform, open-source developer platform for building many different types of applications.

2- restart Epic game

---

<div class="post-metadata">

**Author:** ![Fatal1tyi](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Fatal1tyi](https://forums.unrealengine.com/u/Fatal1tyi)\
**Post date:** [November 14, 2022, 4:01pm UTC](https://forums.unrealengine.com/t/dotnet-is-not-recognized-as-an-internal-or-external-command-ue5-preview-2/505622/5 "2022-11-14T16:01:56Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![CuriousScribbles](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/curiousscribbles/32/1196149_2.png) [@CuriousScribbles](https://forums.unrealengine.com/u/CuriousScribbles)\
**Post date:** [November 19, 2022, 8:15pm UTC](https://forums.unrealengine.com/t/dotnet-is-not-recognized-as-an-internal-or-external-command-ue5-preview-2/505622/6 "2022-11-19T20:15:58Z")

</div>

Thanks!

---

<div class="post-metadata">

**Author:** ![painapple\_pizza](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@painapple\_pizza](https://forums.unrealengine.com/u/painapple_pizza)\
**Post date:** [November 21, 2022, 8:16am UTC](https://forums.unrealengine.com/t/dotnet-is-not-recognized-as-an-internal-or-external-command-ue5-preview-2/505622/7 "2022-11-21T08:16:07Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Zipur](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/zipur/32/490790_2.png) [@Zipur](https://forums.unrealengine.com/u/Zipur)\
**Post date:** [November 24, 2022, 6:45pm UTC](https://forums.unrealengine.com/t/dotnet-is-not-recognized-as-an-internal-or-external-command-ue5-preview-2/505622/8 "2022-11-24T18:45:20Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![rajnesh.jindel](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@rajnesh.jindel](https://forums.unrealengine.com/u/rajnesh.jindel)\
**Post date:** [February 14, 2023, 8:21am UTC](https://forums.unrealengine.com/t/dotnet-is-not-recognized-as-an-internal-or-external-command-ue5-preview-2/505622/9 "2023-02-14T08:21:34Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Sir\_Rollalot](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Sir\_Rollalot](https://forums.unrealengine.com/u/Sir_Rollalot)\
**Post date:** [February 26, 2023, 7:57pm UTC](https://forums.unrealengine.com/t/dotnet-is-not-recognized-as-an-internal-or-external-command-ue5-preview-2/505622/10 "2023-02-26T19:57:41Z")

</div>

6.0.0 worked for me.

---

<div class="post-metadata">

**Author:** ![Sirrockin](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Sirrockin](https://forums.unrealengine.com/u/Sirrockin)\
**Post date:** [March 3, 2023, 7:38pm UTC](https://forums.unrealengine.com/t/dotnet-is-not-recognized-as-an-internal-or-external-command-ue5-preview-2/505622/11 "2023-03-03T19:38:58Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Waleedgawy](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Waleedgawy](https://forums.unrealengine.com/u/Waleedgawy)\
**Post date:** [March 25, 2023, 2:25pm UTC](https://forums.unrealengine.com/t/dotnet-is-not-recognized-as-an-internal-or-external-command-ue5-preview-2/505622/12 "2023-03-25T14:25:09Z")

</div>

i cant get .NET core its discontinued

---

<div class="post-metadata">

**Author:** ![gviklund](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@gviklund](https://forums.unrealengine.com/u/gviklund)\
**Post date:** [April 27, 2023, 2:31am UTC](https://forums.unrealengine.com/t/dotnet-is-not-recognized-as-an-internal-or-external-command-ue5-preview-2/505622/13 "2023-04-27T02:31:16Z")

</div>

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

> **[Setting Up Visual Studio](https://docs.unrealengine.com/5.1/en-US/setting-up-visual-studio-development-environment-for-cplusplus-projects-in-unreal-engine/)**
>
> Tips, tricks, and techniques for setting up Visual Studio to work with Unreal Engine

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.

---

<div class="post-metadata">

**Author:** ![virtualHC](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/virtualhc/32/1194710_2.png) [@virtualHC](https://forums.unrealengine.com/u/virtualHC)\
**Post date:** [May 8, 2023, 3:09pm UTC](https://forums.unrealengine.com/t/dotnet-is-not-recognized-as-an-internal-or-external-command-ue5-preview-2/505622/14 "2023-05-08T15:09:21Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Rooteh](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Rooteh](https://forums.unrealengine.com/u/Rooteh)\
**Post date:** [June 28, 2023, 12:06pm UTC](https://forums.unrealengine.com/t/dotnet-is-not-recognized-as-an-internal-or-external-command-ue5-preview-2/505622/15 "2023-06-28T12:06:23Z")

</div>

lifesaver

---

<div class="post-metadata">

**Author:** ![Kulagin](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Kulagin](https://forums.unrealengine.com/u/Kulagin)\
**Post date:** [July 23, 2023, 4:11pm UTC](https://forums.unrealengine.com/t/dotnet-is-not-recognized-as-an-internal-or-external-command-ue5-preview-2/505622/16 "2023-07-23T16:11:28Z")

</div>

> [@anonymous\_user\_c708d62c1](#):
>
> 1- just download Net Core 3.1

Which one? Microsoft allows us to download these types:  
ASP .NET  
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.

---

<div class="post-metadata">

**Author:** ![Zarrar2802](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/zarrar2802/32/710746_2.png) [@Zarrar2802](https://forums.unrealengine.com/u/Zarrar2802)\
**Post date:** [July 26, 2023, 2:11am UTC](https://forums.unrealengine.com/t/dotnet-is-not-recognized-as-an-internal-or-external-command-ue5-preview-2/505622/17 "2023-07-26T02:11:06Z")

</div>

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
