Skip to content

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.

Error Example

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

  1. Open the Edit environment variable window.

  2. Click New (red box) to add a new entry.

  3. Enter the .NET SDK path as shown in the green box below:

    Path Configuration Example

  4. 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.