Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hello world tutorial #8852

Closed
piotrek2302 opened this issue Oct 23, 2023 · 6 comments
Closed

hello world tutorial #8852

piotrek2302 opened this issue Oct 23, 2023 · 6 comments
Labels
area-tutorials Issues related to getting started tutorials needs-more-info Not enough information has been provided. Please share more detail as requested.

Comments

@piotrek2302
Copy link

piotrek2302 commented Oct 23, 2023

Problem encountered on https://dotnet.microsoft.com/en-us/learn/dotnet/hello-world-tutorial/create
Operating System: windows 10

I have installed the .NET SDK 7,0.402 and tried the first command in the basic hello world tutorial (https://dotnet.microsoft.com/en-us/learn/dotnet/hello-world-tutorial/create) to create new console
dotnet new console -o MyApp -f net7.0
However after this I get an error message

Could not execute because the application was not found or a compatible .NET SDK is not installed.
Possible reasons for this include:
  * You intended to execute a .NET program:
      The application 'new' does not exist.
  * You intended to execute a .NET SDK command:
      It was not possible to find any installed .NET SDKs.
      Install a .NET SDK from:
        https://aka.ms/dotnet-download

Does anybody know what is wrong here? Is it my installation or something? I reinstalled .NET and restarted my PC and still this happens.

@liveans
Copy link
Member

liveans commented Oct 23, 2023

Hello,

Can you post the dotnet --info output here?

@liveans liveans added needs-more-info Not enough information has been provided. Please share more detail as requested. area-tutorials Issues related to getting started tutorials labels Oct 23, 2023
@piotrek2302
Copy link
Author

Host (useful for support):
  Version: 5.0.15
  Commit:  3065735be7

.NET SDKs installed:
  No SDKs were found.

.NET runtimes installed:
  Microsoft.NETCore.App 5.0.15 [C:\Program Files (x86)\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.WindowsDesktop.App 5.0.15 [C:\Program Files (x86)\dotnet\shared\Microsoft.WindowsDesktop.App]

To install additional .NET runtimes or SDKs:
  https://aka.ms/dotnet-download

seems like i dont have any SDKs installed

@liveans
Copy link
Member

liveans commented Oct 23, 2023

Host (useful for support):
  Version: 5.0.15
  Commit:  3065735be7

.NET SDKs installed:
  No SDKs were found.

.NET runtimes installed:
  Microsoft.NETCore.App 5.0.15 [C:\Program Files (x86)\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.WindowsDesktop.App 5.0.15 [C:\Program Files (x86)\dotnet\shared\Microsoft.WindowsDesktop.App]

To install additional .NET runtimes or SDKs:
  https://aka.ms/dotnet-download

seems like i dont have any SDKs installed

Yes, can you make sure that SDK is installed properly, then you should restart the shell/command prompt and try the command again?

@piotrek2302
Copy link
Author

Ok I will try every method to install SDK because I cannot seem to get it installed through the .exe file or installing it from the command line. Do you or anybody else have a solution to this?

@piotrek2302
Copy link
Author

https://stackoverflow.com/questions/67049414/windows-or-visual-studio-2022-cant-find-the-latest-installed-net-sdk-due-to-bi/67049415#67049415
I managed to solve this issue by changing the order of enviroment variables in my windows settings. Took some time to figure out but I did it in the end. You can find the solution in the stackoverflow link.

@mairaw
Copy link
Contributor

mairaw commented Oct 30, 2023

Yeah, @Rick-Anderson created the question and answer based on our comment below because it was a very common issue
#5962 (comment)

We are seeing less and less now due to some changes in the product installation process, but it seems you installed an old version that was 32-bit and that set the path to look at x86 first.

Since you seemed to have fixed your issue, I'm closing this. But let us know if we missed anything.

@mairaw mairaw closed this as completed Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-tutorials Issues related to getting started tutorials needs-more-info Not enough information has been provided. Please share more detail as requested.
Projects
None yet
Development

No branches or pull requests

3 participants