Home > database >  the .NET SDK is not showing up unless run from the folder
the .NET SDK is not showing up unless run from the folder

Time:10-24

I've been trying to set up .NET on my Windows 10 computer. I downloaded the latest SDK and I ran the installer, and it was succesful. However, whenever I run dotnet --version in command prompt or powershell, it says it can't find any version of it. However, when I ran the command after launching it from file explorer(typing cmd at the top where the file path is), it gave me the correct version(latest). I tried adding it to the path as well, still nothing. I also tried uninstall reinstall and a repaire, nothing works. I'm trying to learn the C family and I'm starting with C#, however I can't execute my codes through visual studio code or command prompt. What should I do?

CodePudding user response:

https://dotnet.microsoft.com/learn/dotnet/hello-world-tutorial/intro

Quickstart for .Net - core app.

CodePudding user response:

To answer my own question, I somehow had a corrupt entry, and instead of trying to just repair it with the installer, I had to uninstall(yes I'm stupid I forgot to do this before), and reinstalled it. It now works perfectly.

So I did this again on my laptop, had a different problem though. It seems that I had multiple installations of dotnet, one a 32 bit and one 64 bit.

Ran this to check if there were multiple installed:

where dotnet

I then deleted both of them, and reinstalled and presto!

  • Related