Uninstalling RC1 leave sdk directory causing Dotnet to be in non-working state
Steps to reproduce
- install dotnet sdk RC1 on Windows.
- run some dotnet commands like dotnet build so that it starts the dotnet hosts.
- run the uninstaller (you will need to select the installer to require a reboot because it fails to close the dotnet hosts.)
- once done you can try dotnet commands but will fail with:
Expected behavior
Should just work.
Actual behavior
Found dotnet SDK, but did not find dotnet.dll at [C:\Program Files\dotnet\sdk\2.1.300-rc1-008673\dotnet.dll]
it can then be fixed by deleting the directory.
Environment data
dotnet --info output:
n/a
The uninstaller needs to be able to shutdown the hosts before running.
I just encountered this (tried 2.1 RC, uninstalled it, installed 2.0 again) and had to reboot then delete the 2.1.300-rc-1 folder because I couldn't launch any command with dotnet (same error message)
issue still occurs, i uninstalled 2.1.500-preview-009297 but the directory was left empty, manual deletion fixed it
Same for me, I tried to reinstall the last Stable Sdk, the problem is still there.
Same issue for 2.1.600-preview-009426. @mjjames suggestion fixed the issue for me.
Issue reoccurs on .NET 3.0 preview5; everything was removed except the folder itself.
@mjjames suggestion worked !
Issue also occurs with .NET 5 preview 4. Work around is the same: delete the empty folder manually.
The same for released .NET 5
Due to lack of recent activity, this issue has been labeled as 'Stale'. It will be closed if no further activity occurs within 30 more days. Any new comment will remove the label.