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

Uninstalling .NET SDK 8.0.300 left empty directory that caused "[MSB4236] The SDK 'Microsoft.NET.Sdk' specified could not be found." #41022

Open
loop-evgeny opened this issue May 20, 2024 · 3 comments
Assignees
Labels
Area-Install type-investigation untriaged Request triage from a team member

Comments

@loop-evgeny
Copy link

loop-evgeny commented May 20, 2024

I installed .NET SDK 8.0.205 and then 8.0.300 as well (on Windows). I then uninstalled 8.0.300 (due to dotnet/fsharp#17161). dotnet --info then reported that SDK 8.0.205 was used as expected.

However, when I tried to open .NET projects in JetBrains Rider it failed to load them all with

[MSB4236] The SDK 'Microsoft.NET.Sdk' specified could not be found.

It took me a while to figure out that this was because the directory C:\Program Files\dotnet\sdk\8.0.300\Roslyn still existed (with an empty bincore sub-directory in it, I believe). After I deleted that directory manually Rider loaded .NET projects successfully again.

I'm not sure to what extent this is Rider's fault, but the uninstaller should really delete the entire sdk\8.0.300 directory to avoid this.

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-Install untriaged Request triage from a team member labels May 20, 2024
@baronfel
Copy link
Member

Hypothesis here - maybe a roslyn build-server node was still live when the uninstaller ran and so the directory couldn't be deleted?

@loop-evgeny
Copy link
Author

Possible, but the uninstaller asks whether to close and restart all .NET processes or reboot. I choose "close and restart".

@loop-evgeny
Copy link
Author

loop-evgeny commented Jun 13, 2024

Just ran into this again with 8.0.302, forgot that I already ran into it before, and wasted half a day on it again!

VS also fails to load projects with "error : The SDK 'Microsoft.NET.Sdk' specified could not be found.", so this is not an issue in Rider. (Note that VS does not include the MSBuild error number, however.)

That a directory is left around by the uninstaller is a very minor problem, but the fact that this breaks loading projects, and in such a non-obvious way, is a major problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Install type-investigation untriaged Request triage from a team member
Projects
None yet
Development

No branches or pull requests

3 participants