I can't help but point out at the fact of how much pure
HATE I have toward these type of problems...
@jmcilhinney thank you for the help. Thanks to the pointer you gave me I managed to get to the bottom of the issue... I am going to leave the solution to my problem here with the hopes that it might help someone in the future.
Following
@jmcilhinney's remark about adding/creating a new solution to the project I tried to do so. The result was the following error in a pop up screen ->
The SDK 'Microsoft.NET.Sdk' specified could not be found. E:\ConsoleApp3\consoleapp3.csproj
So I thought it might have been an issue if me using .net version which doesn't have sdk installed properly. I have 0 idea what SDK is and what it does again totally new to all of this stuff.
I went to Visual Studio Installer -> Clicked on "
MODIFY" for the version that I was trying to use. -> Selected everything with SDK in there (I am not sure if this helped resolving my issue)
Next -> Open a command prompt and issue the following command -> dotnet --list-sdks -> this will display a list of the
sdks you have installed on your pc. If you get blank (which is what i've got) than chances are you have the problem I have.
Just to be on a safe side I am leaving a link over here from where you can download the latest SDKS from microsoft ->
Download .NET (Linux, macOS, and Windows)
Follow the next steps:
- Open the Control Panel by searching for it in the Start menu or using the Windows key + X shortcut.
- Click on "System and Security" and then click on "System".
- On the left-hand side of the window, click on "Advanced system settings".
- In the "System Properties" window that appears, click on the "Environment Variables" button.
- Follow the picture which I have uploaded below which is basically -> System variables window -> double click Path -> Over here there are 2 paths "C:\Program Files\dotnet\" and "C:\Program Files (x86)\dotnet\" now in my case I am on Windows 10 OS 64 bit so I removed the "C:\Program Files (x86)\dotnet\"
- Close all the windows and restart your PC.
This should resolve your issue... at least it did for me. If you open command prompt and issue the "dotnet --list-sdks" command it should give you a list of SDKS you have installed now.