Visual Studio for Mac -错误的.net sdk位置,进行更正更新时覆盖值

wbrvyc0a  于 2023-07-01  发布在  .NET
关注(0)|答案(1)|浏览(144)

我的visual studio for mac正在一个不存在的路径中查找.net sdk:vs for mac(https://i.stack.imgur.com/xS7Cj.png
我的SDK安装在我的usr/local/dotnet文件夹中:location
当我在VS for Mac IDE中更新到这个位置时,我可以清楚地看到SDK。当我退出此菜单时,它会重置为不存在的路径。我又回到了起点。updated sdks
我如何将此更新到正确的路径,以便我可以针对.net?
This is the output of dotnet info:` `.NET SDK:` `Version: 8.0.100-preview.5.23303.2` `Commit: 3fe444af72` `Runtime Environment:` `OS Name: Mac OS X` `OS Version: 12.4` `OS Platform: Darwin` `RID: osx.12-arm64` `Base Path: /usr/local/share/dotnet/sdk/8.0.100-preview.5.23303.2/` `.NET workloads installed:` `There are no installed workloads to display.` `Host:` `Version: 8.0.0-preview.5.23280.8` `Architecture: arm64` `Commit: bc78804f5d` `.NET SDKs installed:` `6.0.408 [/usr/local/share/dotnet/sdk]` `6.0.410 [/usr/local/share/dotnet/sdk]` `7.0.302 [/usr/local/share/dotnet/sdk]` `7.0.304 [/usr/local/share/dotnet/sdk]` `8.0.100-preview.5.23303.2 [/usr/local/share/dotnet/sdk]` `.NET runtimes installed:` `Microsoft.AspNetCore.App 6.0.16 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]` `Microsoft.AspNetCore.App 6.0.18 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]` `Microsoft.AspNetCore.App 7.0.5 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]` `Microsoft.AspNetCore.App 7.0.7 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]` `Microsoft.AspNetCore.App 8.0.0-preview.5.23302.2 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]` `Microsoft.NETCore.App 6.0.16 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]` `Microsoft.NETCore.App 6.0.18 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]` `Microsoft.NETCore.App 7.0.5 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]` `Microsoft.NETCore.App 7.0.7 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]` `Microsoft.NETCore.App 8.0.0-preview.5.23280.8 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]` `Other architectures found:` `x64 [/usr/local/share/dotnet/x64]` `registered at [/etc/dotnet/install_location_x64]` `Environment variables:` `Not set` `global.json file:` `Not found

qc6wkl3g

qc6wkl3g1#

问题是,您选择的是目录,而不是dotnet文件。如果你转到你的目录(/usr/local/share/dotnet/),你会看到dotnet文件(Unix可执行文件),在VS中你需要选中这个文件,然后点击确定按钮

相关问题