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

Installed .NET 6.0 SDKs not showing with dotnet --info or dotnet --list-sdks #38332

Closed
adrianwright109 opened this issue Nov 12, 2021 · 6 comments

Comments

@adrianwright109
Copy link
Contributor

Hi,

I'm not sure if this is the correct repo for this issue, so please transfer to the appropriate team as necessary.

I've just installed Visual Studio 2022 using the VS installer to my Windows 10 machine.

I have installed 2 versions, "Current" 17.0.0 and "Preview" 17.1.0 Preview 1.0.

I selected the "ASP.NET and web development" workload for both installs and kept all the default components that the workload has configured.

When I run dotnet --info or dotnet --list-sdks from the command line I was expecting to see 2 SDKs listed, the GA release SDK for .NET 6.0 and the Preview SDK for .NET 6.0.

Actual output is that both the commands show no SDKs installed, which doesn't seem correct?

If I look in Windows at what SDKs are installs it list this:
image

Shouldn't this SDK be listed when running dotnet --info or dotnet --list-sdks from the command line?

Further technical details

  • ASP.NET Core version: 6.0
  • The IDE: Visual Studio Community 2022 versions 17.0.0 and 17.1.0 Preview 1.0
dotnet --info Output
dotnet --info

Host (useful for support):
  Version: 6.0.0
  Commit:  4822e3c3aa

.NET SDKs installed:
  No SDKs were found.

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

To install additional .NET runtimes or SDKs:
  https://aka.ms/dotnet-download
@javiercn
Copy link
Member

@adrianwright109 thanks for contacting us.

@dotnet/aspnet-build any thoughts?

/cc: @Pilchie

@adrianwright109
Copy link
Contributor Author

adrianwright109 commented Nov 12, 2021

I have since found this is a .NET 6.0 known issue as stated on in .NET 6.0 Known Issues.

The fix is to change the order of the dotnet.exe paths in the PATH system environment variable so that the x64 path comes before the x86 path e.g.

c:\Program Files\dotnet
c:\Program Files (x86)\dotnet

@mickelsonmichael
Copy link

For others coming to this with a similar issue but the PATH variables are in the order mentioned by @adrianwright109 above:

Ensure you installed the correct version (x64 vs x86) of the SDK

In my instance I mistakenly clicked the x86 download link and didn't realize it. I figured that out by swapping the order of the PATH variables so the x86 instance came first, which resulted in the .NET 6 SDK being the only one listed.

@GearTheWorld
Copy link

GearTheWorld commented Dec 4, 2021

There is no such dotnet.exe found in Environment Variables

Windows 10 Pro
21H2
19044.1348

Microsoft Visual Studio Community 2022 (64-bit)
Version 17.0.2

@DanielD
Copy link

DanielD commented Dec 13, 2021

I have installed this version of the 6.0 runtime on a Windows Server 2016: dotnet-runtime-6.0.0-win-x64.exe as noted by @mickelsonmichael
My PATH variables are in the correct order according to @adrianwright109

When running at the command line, I get the same errors:
`C:\Program Files\MyCompany\MyApp>dotnet .\MyApp.dll
It was not possible to find any compatible framework version
The framework 'Microsoft.AspNetCore.App', version '6.0.0' (x64) was not found.

  • The following frameworks were found:
    3.1.3 at [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
    5.0.6 at [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]

You can resolve the problem by installing the specified framework and/or SDK.

The specified framework can be found at:

C:\Program Files\MyCompany\MyApp>dotnet --info

Host (useful for support):
Version: 6.0.0
Commit: 4822e3c3aa

.NET SDKs installed:
No SDKs were found.

.NET runtimes installed:
Microsoft.AspNetCore.App 3.1.3 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.1.3 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]

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

C:\Program Files\MyCompany\MyApp>`

@dougbu
Copy link
Member

dougbu commented Dec 13, 2021

@DanielD you have correctly installed the 6.0.0 version of Microsoft.NETCore.App but apparently do not have the Microsoft.AspNetCore.App runtime for that version. The https://aka.ms/dotnet-core-applaunch?framework=Microsoft.AspNetCore.App&framework_version=6.0.0&arch=x64&rid=win10-x64 link (under "Run server apps") will get you the missing piece.

@ghost ghost locked as resolved and limited conversation to collaborators Jan 12, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants