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

No .NET SDKs were found #8327

Closed
mfalagan opened this issue Mar 27, 2023 · 12 comments
Closed

No .NET SDKs were found #8327

mfalagan opened this issue Mar 27, 2023 · 12 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. Stale

Comments

@mfalagan
Copy link

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

After installing the dotnet SDK as specified in the "Download and Install" section in the tutoial, I tried running the dotnet new console -o MyApp -f net7.0 command, which produced the following message:

The command could not be loaded, possibly because:
  * You intended to execute a .NET application:
      The application 'new' does not exist.
  * You intended to execute a .NET SDK command:
      No .NET SDKs were found.

Download a .NET SDK:
https://aka.ms/dotnet-download

Learn about SDK resolution:
https://aka.ms/dotnet/sdk-not-found

running dotnet --info yields the following:

global.json file:
  Not found

Host:
  Version:      6.0.10
  Architecture: x86
  Commit:       5a400c212a

.NET SDKs installed:
  No SDKs were found.

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

Download .NET:
  https://aka.ms/dotnet-download

Learn about .NET Runtimes and SDKs:
  https://aka.ms/dotnet/runtimes-sdk-info

I tried restarting my compute after installing the SDK, and reinstalling it, to no avail.

@layomia
Copy link

layomia commented Mar 27, 2023

@mfalagan did you download and install the SDK itself and not, say, a runtime? e.g. SDK 7.0.202 on this page -https://dotnet.microsoft.com/en-us/download/dotnet/7.0.

@layomia layomia added the needs-more-info Not enough information has been provided. Please share more detail as requested. label Mar 27, 2023
@mairaw mairaw added the area-tutorials Issues related to getting started tutorials label Mar 27, 2023
@mfalagan
Copy link
Author

Yes, I had installed the SDK.

Anyway, I tried again with the SDK you provided, and still had no luck.

I see you added the needs more info label, I'm not well versed in github issues, so I'd greatly appreciate if you could specify which more useful information I could provide, I would be happy to do so.

I am not sure either whether this issue of mine belongs here, as seemingly it is an issue with my installation athe than with the SDK. Please, if I should seek help somewhere else, do tell me.

Thank you for your assistance in any case.

@dagood
Copy link
Member

dagood commented Mar 28, 2023

It looks like you might have both x86 and x64 versions of .NET installed, which can cause what you're seeing. I'd suggest taking a look at where dotnet and adjusting PATH if necessary. Check out these comments for more info:
#5962 (comment)
#5962 (comment)

@github-actions
Copy link

github-actions bot commented Apr 5, 2023

This issue is stale because there has been no response to a request for more information for 7 days.

@github-actions github-actions bot added the Stale label Apr 5, 2023
@github-actions
Copy link

github-actions bot commented Apr 8, 2023

This issue was closed because there was no response to a request for more information for 10 days.

@github-actions github-actions bot closed this as completed Apr 8, 2023
@LorenzHohermuth
Copy link

I have the same problem, but the where dotnet doesn't give an output.

@LorenzHohermuth
Copy link

On Windows you have to run where.exe dotnet

@LorenzHohermuth
Copy link

For everyone still stuck, I had the Runtime and the SDK in different folders, you have to have them in the same folder.

+---host
|	\---fxr
|		\---7.0.11
+---metadata
|	\---workloads
|		\---7.0.400
|			\---installertype
+---packs
|	+---Microsoft.AspNetCore.App.Ref
|	|
|	+---Microsoft.NETCore.App.Host.win-arm
|	|
|	+---Microsoft.NETCore.App.Host.win-arm64
|	|
|	+---Microsoft.NETCore.App.Host.win-x64
|	|
|	+---Microsoft.NETCore.App.Host.win-x86
|	|
|	+---Microsoft.NETCore.App.Ref
|	|
|	+---Microsoft.WindowsDesktop.App.Ref
|	|
|	\---NETStandard.Library.Ref
|
+---sdk
|	\---7.0.401
|
+---sdk-manifests
|
+---dotnet.exe
|
+---shared
|	+---Microsoft.AspNetCore.App
|	|	\---7.0.11
|	\---Microsoft.NETCore.App
|		\---7.0.11
+---swidtag
\---templates
	\---7.0.11

@paulwababu
Copy link

paulwababu commented Oct 9, 2023

I was able to temporarily fix this, it was an issue with the path.

After running where.exe dotnet, I copied the path to my dotnet.exe and use it for running any command like so..

"C:\Program Files\dotnet\dotnet.exe" new webapp -o MyWebApp --no-https -f net7.0

@Dejn0
Copy link

Dejn0 commented Dec 21, 2023

Hi, I also encountered this problem. In my case what helped was installing the SDK again, because the version that the site downloaded automatically was x64 and I needed x86.

@isaqueMarinh0
Copy link

Olá, também encontrei esse problema. No meu caso o que ajudou foi instalar o SDK novamente, pois a versão que o site baixou automaticamente era x64 e eu precisava de x86.

Cara, eu amo você. Escrevi no terminal dotnet --info para ver os sdks e não aparecia nada, depois que li seu comentário percebi algo:

Host:
Version: 8.0.1
Architecture: x86 <-------- ESSA PORRA
Commit: bf5e279d92

Estava baixando o x64 tbm kakakaka

@mairaw
Copy link
Contributor

mairaw commented Feb 13, 2024

The site should actually be referring you to the proper arch based on your machine information. To be certain, you should go to the about your PC and confirm the processor type of your machine.

However, many people encounter issues with their PATH. Check out these instructions:
#5962 (comment)

If you really have an x86 machine and the website is showing x64, can you please log an issue at https://github.com/dotnet/website-feedback?

@isaqueMarinh0 para você também. Por favor confirme se a sua máquina é realmente x86 ou se o dotnet está invocando x86 por cause de um problema no PATH.
Por favor confirme nas configurações do Windows se sua máquina é realmente x86. Aquela informação de arquitetura apenas indica qual versão do dotnet está sendo invocada.

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. Stale
Projects
None yet
Development

No branches or pull requests

8 participants