跳转到内容
View in the app

A better way to browse. Learn more.

彼岸论坛

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
欢迎抵达彼岸 彼岸花开 此处谁在 -彼岸论坛

[.NET] 为什么我已经在 Visual Studio 中安装了.Net 8.0,但是命令行显示的版本仍然是 6.0.31?

发表于

我当前用 Visual Studio 进行 C#代码调试,希望学习一下单元测试相关知识。今天刚刚安装了 Visual Studio ,并“单独”安装了.Net 8.0 (见下方截图)。但是安装成功以后我运行 dotnet --info 显示结果如下: 可以看到 Host:Version: 6.0.31 这与我刚刚安装好 Visual Studio ,没有单独安装.Net 8.0 时的情况是一样的。

我之前使用 VS code 时是单独从微软网站上下载安装.Net 8.0 。安装以后运行 dotnet --info ,Host:Version: 当时显示的是 8.0 。 请问我如何才能将.Net 版本升级到 8.0 呢?

global.json file:
  Not found

Host:
  Version:      6.0.31
  Architecture: x64
  Commit:       e2ca2f8a1c

.NET SDKs installed:
  No SDKs were found.

.NET runtimes installed:
  Microsoft.AspNetCore.App 8.0.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 6.0.31 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 8.0.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.WindowsDesktop.App 6.0.31 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 8.0.6 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Download .NET:
  https://aka.ms/dotnet-download

Learn about .NET Runtimes and SDKs:
  https://aka.ms/dotnet/runtimes-sdk-info

pkBekv9.png

Featured Replies

No posts to show

创建帐户或登录来提出意见

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.