dotnet command not found
Problem
When trying to use the dotnet
command in the terminal, you may see an error indicating that the command is not found. This is usually due to a missing .NET SDK path in the system PATH environment variable.
Solution
To resolve this, add the .NET SDK folder to your system PATH.
Update Your System PATH Variable
Follow Steps 1–3 in the “Update your system PATH variable” section here.
After completing those steps, return here to add the specific .NET SDK path.
Add .NET SDK Path to PATH Variable
-
Open the Edit environment variable window.
-
Click New (red box) to add a new entry.
-
Enter the .NET SDK path as shown in the green box below:
-
Ensure the path aligns with the location where the .NET SDK is installed on your system, typically
C:\Program Files\dotnet
.
Restart MINGW64 Terminal
- Click OK on all open windows to save the changes.
- Open a new MINGW64 terminal window and try running the
dotnet
command again.
Following these steps should make the dotnet
command available, allowing you to run .NET applications on Windows without further issues.