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

.NET SDK Not Recognized #9051

Closed
cdupuisKR opened this issue Jan 9, 2024 · 18 comments
Closed

.NET SDK Not Recognized #9051

cdupuisKR opened this issue Jan 9, 2024 · 18 comments
Labels
area-setup Issues related to installing .NET Core needs-more-info Not enough information has been provided. Please share more detail as requested. Stale

Comments

@cdupuisKR
Copy link

Description

I have seen the posts about the same issue where you load a solution and the projects won't load and there is a problem with the SDKs but my where.exe dotnet only brings up:
C:\Program Files\dotnet\dotnet.exe
Does anyone have a solution for this version of the problem?
Thank You!

Configuration

Regression?

Other information

@mairaw
Copy link
Contributor

mairaw commented Jan 9, 2024

As I mentioned at #5962 (comment)

can you confirm what is the architecture of your Windows machine and can you share the results of dotnet --info?

@mairaw mairaw added needs-more-info Not enough information has been provided. Please share more detail as requested. area-setup Issues related to installing .NET Core labels Jan 9, 2024
@cdupuisKR
Copy link
Author

The architecture is Windows 10 pro x64.
dotnet --info gives me:
.NET SDK:
Version: 7.0.203
Commit: 5b005c19f5

Runtime Environment:
OS Name: Windows
OS Version: 10.0.19043
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\7.0.203\

Host:
Version: 7.0.5
Architecture: x64
Commit: 8042d61b17

.NET SDKs installed:
7.0.203 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
Microsoft.AspNetCore.All 2.1.30 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.30 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.32 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.25 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 7.0.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 7.0.14 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.1.30 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.32 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.10 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.11 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.14 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.16 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.25 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.14 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.1.32 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.25 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 7.0.5 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 7.0.14 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Other architectures found:
x86 [C:\Program Files (x86)\dotnet]
registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]

Environment variables:
Not set

global.json file:
Not found

Learn more:
https://aka.ms/dotnet/info

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

@mairaw
Copy link
Contributor

mairaw commented Jan 10, 2024

Things look good on your output. And when you run a SDK command, you're getting the SDK not found message then @cdupuisKR? Or what kind of error you're getting when you load the project? Is it on VS or VS Code?

@baronfel any suggestions?

@baronfel
Copy link
Member

Nothing jumps out to me as wrong from the dotnet --info output. I'd echo @mairaw's questions here - does a command-line build of your project work @cdupuisKR? Is the problem surfacing only in VS/VSCode?

@cdupuisKR
Copy link
Author

I have only tried of VS and I got the SDK error once but doesn't pop up anymore. It made me "upgrade the solution" and gave me the attached error message also. I have tried repairing and reinstalling and it hasn't worked. What's weird is I can open my solutions using VB code just fine, it is only happening to my C# solutions.
Capture

@mairaw
Copy link
Contributor

mairaw commented Jan 10, 2024

What version of VS are you using? Have you finished the upgrade and is giving you an error when you load the upgraded solution?

Can you run simple SDK commands on the console? For example, can you create a new console project using the command prompt using dotnet new console?

@cdupuisKR
Copy link
Author

I'm using the most up to date VS 17.8.3. I opened the original solution that I have brought up in VS 17 before and then it gave all these update errors. Now I get that my projects won't load in both the updated solution and the backup solution before the update. I just ran dotnet new console in the command prompt and gave me this:
The template "Console App" was created successfully.

Processing post-creation actions...
Restoring C:\Users\cdupuis\cdupuis.csproj:
Determining projects to restore...
Restored C:\Users\cdupuis\cdupuis.csproj (in 69 ms).
Restore succeeded.

@cdupuisKR
Copy link
Author

I have also tried reverting back to VS 17.7 and VS 16.11 and the same error comes up.

@mairaw
Copy link
Contributor

mairaw commented Jan 10, 2024

Ok, so the SDK is running fine on your machine. Seems to be a problem with Visual Studio then. I still don't know which errors you're seeing in VS. But I'd recommend that you report the bug through VS so it can go to the right team. On the main menu, select Help > Send Feedback > Report a Problem.

@cdupuisKR
Copy link
Author

Okay thank you!

@cdupuisKR
Copy link
Author

Sorry one last try! Visual Studio support takes a long time to respond. I recreated opening the solution for the first time and have attached the errors it gives me. Not sure you can help me but worth a try!
Capture2
Capture3

@jekelly
Copy link

jekelly commented Jan 16, 2024

Hi @cdupuisKR - can you report this on Developer Community? Providing repro steps and a recording with your ticket should give us enough information to fully investigate.

If you've already done this, please include a link to the feedback.

@cdupuisKR
Copy link
Author

Here is the link to the developer community:
https://developercommunity.visualstudio.com/t/NET-Solutions-Not-Opening-Properly/10555085

@cdupuisKR
Copy link
Author

Most of the post on the developer community were put as private if you need help accessing I can send some screen shots.

@mairaw
Copy link
Contributor

mairaw commented Jan 18, 2024

We can see the private messages and images when logged in with the Microsoft credentials. Thank you!

@cdupuisKR
Copy link
Author

Would you be able to help me with the ticket? I haven't heard a response in over a week and I'm not sure if the person I was talking to is still working on it. I have the solutions posted in that developer community and can provide more information if needed. Thank You!

Copy link

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 Jan 25, 2024
Copy link

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 not planned Won't fix, can't repro, duplicate, stale Jan 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-setup Issues related to installing .NET Core 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

4 participants