79800195

Date: 2025-10-26 17:18:21
Score: 1
Natty:
Report link

As it turns out, I had two dotnet directories in C:\Program Files and C:\Program Files (x86) in the PATH environment variable. The SDK was in Program Files, but the Program Files (x86) one had only the runtime - so, when I ran dotnet, it actually executed the one in Program Files (x86).

The fix is simple. Go to Windows Search, then Edit the system environment variables. In the following image, click Environment variables....

enter image description here

In the following image, select Path and click Edit, in the System variables section.

enter image description here

In the following image, select the C:\Program Files (x86)\dotnet directory and click Delete. (I've already removed it earlier, so it doesn't appear in the following image, but you should be able to find it.) enter image description here

Click OK on all 3 windows or close them.

Reasons:
  • Probably link only (1):
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: winscripter