AlmaLinux 9
Sponsored Link

.NET Core 3.1 : インストール2023/03/10

.NET Core 3.1 をインストールします。
[1] .NET Core 3.1 のインストールと動作確認です。
[root@dlp ~]#
dnf -y install dotnet-runtime-3.1 dotnet-sdk-3.1 dotnet-targeting-pack-3.1 dotnet-templates-3.1 dotnet-hostfxr-3.1

Dependencies resolved.
 Package                          Arch     Version            Repository   Size
 dotnet-hostfxr-3.1               x86_64   3.1.18-1.el9       appstream   175 k
 dotnet-runtime-3.1               x86_64   3.1.18-1.el9       appstream    26 M
 dotnet-sdk-3.1                   x86_64   3.1.118-1.el9      appstream    40 M
 dotnet-targeting-pack-3.1        x86_64   3.1.18-1.el9       appstream   1.9 M
 dotnet-templates-3.1             x86_64   3.1.118-1.el9      appstream   1.9 M
Installing dependencies:
 aspnetcore-runtime-3.1           x86_64   3.1.18-1.el9       appstream   6.1 M
 aspnetcore-targeting-pack-3.1    x86_64   3.1.18-1.el9       appstream   1.1 M
 dotnet-apphost-pack-3.1          x86_64   3.1.18-1.el9       appstream    74 k
 dotnet-host                      x86_64   6.0.4-2.el9        appstream   173 k
 lttng-ust                        x86_64   2.12.0-6.el9       appstream   292 k
 netstandard-targeting-pack-2.1   x86_64   6.0.104-2.el9      appstream   1.3 M

Transaction Summary
Install  11 Packages

[root@dlp ~]#
dotnet --version


# Hello World で動作確認

[root@dlp ~]#
dotnet new console -o helloworld

Welcome to .NET Core 3.1!
SDK Version: 3.1.118

Explore documentation:
Report issues and find source on GitHub:
Find out what's new:
Learn about the installed HTTPS developer cert:
Use 'dotnet --help' to see available commands or visit:
Write your first app:
Getting ready...
The template "Console Application" was created successfully.

Processing post-creation actions...
Running 'dotnet restore' on helloworld/helloworld.csproj...
  Restore completed in 89.77 ms for /root/helloworld/helloworld.csproj.

Restore succeeded.

[root@dlp ~]#
cd helloworld

[root@dlp helloworld]#
dotnet run

Hello World!