.NET 6 安装说明


1. 安装方法

当前支持 dotnet-sdk 各子模块单独分包安装,各子模块如下:

  • aspnetcore-runtime-6.0
  • aspnetcore-targeting-pack-6.0
  • dotnet-apphost-pack-6.0
  • dotnet-host-6.0
  • dotnet-hostfxr-6.0
  • dotnet-runtime-6.0
  • dotnet-runtime-deps-6.0
  • dotnet-sdk-6.0
  • dotnet-targeting-pack-6.0
  • netstandard-targeting-pack-2.1

1.1. 使用包管理器离线安装/卸载

  • 下载页面 下载安装包,请确认所使用的版本。
  • 安装/卸载:(以 dotnet-sdk-6.0.106-1 loongarch64 示例)

deb

# 离线安装命令,需要注意安装包顺序
$ sudo apt install ./dotnet-host-6.0.6-1-loongarch64.deb \
                ./dotnet-hostfxr-6.0.6-1-loongarch64.deb \
                ./dotnet-runtime-deps-6.0.6-1-loongarch64.deb \
                ./dotnet-runtime-6.0.6-1-loongarch64.deb \
                ./dotnet-targeting-pack-6.0.6-1-loongarch64.deb \
                ./aspnetcore-targeting-pack-6.0.6-1-loongarch64.deb \
                ./dotnet-apphost-pack-6.0.6-1-loongarch64.deb \
                ./aspnetcore-runtime-6.0.6-1-loongarch64.deb \
                ./netstandard-targeting-pack-2.1_2.1.0-1_1-loongarch64.deb \
                ./dotnet-sdk-6.0.106-1-loongarch64.deb

# 卸载:
$ sudo apt remove dotnet-runtime-deps-6.0 \
                dotnet-apphost-pack-6.0 \
                dotnet-host \
                dotnet-hostfxr-6.0 \
                dotnet-runtime-6.0 \
                dotnet-sdk-6.0 \
                dotnet-targeting-pack-6.0 \
                aspnetcore-runtime-6.0 \
                aspnetcore-targeting-pack-6.0 \
                netstandard-targeting-pack-2.1

rpm

# 离线安装命令,需要注意安装包顺序 - Loongnix Server RPM
$ sudo yum install dotnet-host-6.0.6-1.loongarch64.rpm \
                dotnet-hostfxr-6.0-6.0.6-1.loongarch64.rpm \
                dotnet-runtime-deps-6.0-6.0.6-1.loongarch64.rpm \
                dotnet-runtime-6.0-6.0.6-1.loongarch64.rpm \
                dotnet-targeting-pack-6.0-6.0.6-1.loongarch64.rpm \
                aspnetcore-targeting-pack-6.0-6.0.6-1.loongarch64.rpm \
                dotnet-apphost-pack-6.0-6.0.6-1.loongarch64.rpm \
                aspnetcore-runtime-6.0-6.0.6-1.loongarch64.rpm \
                netstandard-targeting-pack-2.1-2.1.0-1.loongarch64.rpm \
                dotnet-sdk-6.0-6.0.106-1.loongarch64.rpm

# 离线安装命令,需要注意安装包顺序 - 麒麟v10 RPM
$ sudo yum install dotnet-host-6.0.6-1.a.ky10.loongarch64.rpm \
                dotnet-hostfxr-6.0-6.0.6-1.a.ky10.loongarch64.rpm \
                dotnet-runtime-deps-6.0-6.0.6-1.a.ky10.loongarch64.rpm \
                dotnet-runtime-6.0-6.0.6-1.a.ky10.loongarch64.rpm \
                dotnet-targeting-pack-6.0-6.0.6-1.a.ky10.loongarch64.rpm \
                aspnetcore-targeting-pack-6.0-6.0.6-1.a.ky10.loongarch64.rpm \
                dotnet-apphost-pack-6.0-6.0.6-1.a.ky10.loongarch64.rpm \
                aspnetcore-runtime-6.0-6.0.6-1.a.ky10.loongarch64.rpm \
                netstandard-targeting-pack-2.1-2.1.0-1.a.ky10.loongarch64.rpm \
                dotnet-sdk-6.0-6.0.106-1.a.ky10.loongarch64.rpm

# 卸载:
$ sudo yum remove dotnet-runtime-deps-6.0 \
                dotnet-apphost-pack-6.0 \
                dotnet-host \
                dotnet-hostfxr-6.0 \
                dotnet-runtime-6.0 \
                dotnet-sdk-6.0 \
                dotnet-targeting-pack-6.0 \
                aspnetcore-runtime-6.0 \
                aspnetcore-targeting-pack-6.0 \
                netstandard-targeting-pack-2.1

1.2. 使用包管理器在线安装/卸载

deb

# 在线安装
$ sudo apt install dotnet-sdk-6.0

# 卸载:
$ sudo apt remove dotnet-runtime-deps-6.0 \
                dotnet-apphost-pack-6.0 \
                dotnet-host \
                dotnet-hostfxr-6.0 \
                dotnet-runtime-6.0 \
                dotnet-sdk-6.0 \
                dotnet-targeting-pack-6.0 \
                aspnetcore-runtime-6.0 \
                aspnetcore-targeting-pack-6.0 \
                netstandard-targeting-pack-2.1

rpm

# 在线安装
$ sudo yum install dotnet-sdk-6.0

# 卸载:
$ sudo yum remove dotnet-runtime-deps-6.0 \
                dotnet-apphost-pack-6.0 \
                dotnet-host \
                dotnet-hostfxr-6.0 \
                dotnet-runtime-6.0 \
                dotnet-sdk-6.0 \
                dotnet-targeting-pack-6.0 \
                aspnetcore-runtime-6.0 \
                aspnetcore-targeting-pack-6.0 \
                netstandard-targeting-pack-2.1

1.3. 查看安装结果

$ whereis dotnet
dotnet: /usr/bin/dotnet /usr/share/dotnet /usr/share/man/man1/dotnet.1.gz

1.4. 查看 .NET 版本

更多关于 .NET 的使用方法及示例,请参考 .NET在线文档

### 查看SDK版本:

可使用终端查看当前安装的 .NET Core SDK 版本。 打开终端并运行以下命令。

dotnet --list-sdks

查看运行时版本:

可使用以下命令查看当前安装的 .NET Core 运行时版本。

dotnet --list-runtimes

详细信息:

可通过以下命令查看 SDK 版本和运行时版本。 你还将获得其他环境相关信息,如操作系统版本和运行时标识符 (RID)。

dotnet --info

1.5. 直接配置安装

敬请期待....


©龙芯开源社区 all right reserved,powered by Gitbook文档更新时间: 2022-06-30 01:11:31

results matching ""

    No results matching ""

    results matching ""

      No results matching ""