Found .NET SDK, but did not find dotnet.dll
Asked Answered
B

2

13

I recently installed Visual Studio 2022 preview.

Today I was in a workshop and there was some feature that didn't work, and it turned out it was because I had the preview version of .NET 6 installed.

So I then uninstalled Visual Studio 2022 preview.

Now, when I type dotnet --version (or other command like dotnet --info) in a command window, I get the following message:

  • Found .NET SDK, but did not find dotnet.dll at [C:\Program Files\dotnet\sdk\6.0.100-preview.7.21379.14\dotnet.dll]

I have tried to repair, and then reinstall DotNet SDK 5.0.400. Restarted machine a few times as well, to no avail.

I am guessing the uninstaller removed the files, but failed to restore the registry to the previous version.

How do I fix this?

Beals answered 14/9, 2021 at 12:41 Comment(0)
B
40

So right after posting my question, I discovered that the uninstaller had left some leftovers on my disk. There was a folder with some files, called 6.0.100-preview.7.21379.14. After I deleted it, the command "dotnet --version" now returns "5.0.400".

As Mark wrote below, the folders mentioned reside inside this folder: C:\Program Files\dotnet\sdk

Beals answered 14/9, 2021 at 12:44 Comment(1)
phew thanks, I was already starting to panic when a reboot didn't fix it (I miss old Windows).. Maybe it's good to mention that those folders reside in C:\Program Files\dotnet\sdkBename
R
7

I also ran into the same problem recently. I had to go to the below path in Windows and delete all 6.*.* folders.

C:\Program Files\dotnet
Rhetoric answered 14/2, 2022 at 1:35 Comment(1)
For anyone reading this do NOT do this step....Materialism

© 2022 - 2024 — McMap. All rights reserved.