卸载 .NET Core SDK 7.0

6

问)如何卸载.NET Core SDK 7.0.100-rc.2.22477.23

我正在尝试使用命令行工具dotnet-core-uninstall进行卸载,但由于提示[不能卸载版本7.0.0及以上]而无法成功卸载。

即使使用以下命令行也失败了:

michael@MichaelWorkBook dotnet-core-uninstall % ./dotnet-core-uninstall dry-run --sdk 7.0.100-rc.2.22477.23
Uninstallation not allowed. This tool cannot uninstall .NET Core SDKs with version 7.0.0 or above.

这是我正在使用的工具.NET卸载工具,用于尝试卸载.NET。
额外信息:记不太清了,可能是通过Visual Studio for Mac安装了.NET SDK 7.0。版本7 RC2可能意外地损害了我的编译Azure函数项目的能力。 dotnet-core-uninstall list命令行截图

不是很奇怪。初步的部分支持,或者根本没有支持。从 https://learn.microsoft.com/en-us/dotnet/core/install/remove-runtime-sdk-versions?pivots=os-macos#uninstall-net 中获取一些 shell 命令就足够了。 - Lex Li
1个回答

5

在 MacOS 上

重大影响

删除文件夹 usr/local/share/dotnet

轻微影响

version="7.0.100-rc.2.22477.23"
sudo rm -rf /usr/local/share/dotnet/sdk/$version
sudo rm -rf /usr/local/share/dotnet/shared/Microsoft.NETCore.App/$version
sudo rm -rf /usr/local/share/dotnet/shared/Microsoft.AspNetCore.All/$version
sudo rm -rf /usr/local/share/dotnet/shared/Microsoft.AspNetCore.App/$version
sudo rm -rf /usr/local/share/dotnet/host/fxr/$version

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接