FreeBSD 15

.NET 9.0 : インストール2026/01/30

 

.NET をインストールします。

[1] .NET 9.0 のインストールと動作確認です。
root@dlp:~ #
pkg install -y dotnet
root@dlp:~ #
dotnet --version

9.0.111

# Hello World で動作確認

root@dlp:~ #
dotnet new console -o helloworld


Welcome to .NET 9.0!
---------------------
SDK Version: 9.0.111

----------------
Installed an ASP.NET Core HTTPS development certificate.
To trust the certificate, run 'dotnet dev-certs https --trust'
Learn about HTTPS: https://aka.ms/dotnet-https

----------------
Write your first app: https://aka.ms/dotnet-hello-world
Find out what's new: https://aka.ms/dotnet-whats-new
Explore documentation: https://aka.ms/dotnet-docs
Report issues and find source on GitHub: https://github.com/dotnet/core
Use 'dotnet --help' to see available commands or visit: https://aka.ms/dotnet-cli
--------------------------------------------------------------------------------------
The template "Console App" was created successfully.

Processing post-creation actions...
Restoring /root/helloworld/helloworld.csproj:
Restore succeeded.

root@dlp:~ #
cd helloworld

root@dlp:~/helloworld#
dotnet run

Hello, World!
[2] 任意の一般ユーザーで ASP.NET Web App サンプルアプリケーションを動作確認します。
ubuntu@dlp:~$
dotnet new razor -o asp.net


Welcome to .NET 9.0!
---------------------
SDK Version: 9.0.111

----------------
Installed an ASP.NET Core HTTPS development certificate.
To trust the certificate, run 'dotnet dev-certs https --trust'
Learn about HTTPS: https://aka.ms/dotnet-https

----------------
Write your first app: https://aka.ms/dotnet-hello-world
Find out what's new: https://aka.ms/dotnet-whats-new
Explore documentation: https://aka.ms/dotnet-docs
Report issues and find source on GitHub: https://github.com/dotnet/core
Use 'dotnet --help' to see available commands or visit: https://aka.ms/dotnet-cli
--------------------------------------------------------------------------------------
The template "ASP.NET Core Web App (Razor Pages)" was created successfully.
This template contains technologies from parties other than Microsoft, see https://aka.ms/aspnetcore/9.0-third-party-notices for details.

Processing post-creation actions...
Restoring /home/freebsd/asp.net/asp.net.csproj:
Restore succeeded.

ubuntu@dlp:~$
cd asp.net

freebsd@dlp:~/asp.net $
dotnet run --urls=http://0.0.0.0:5000

Using launch settings from /home/freebsd/asp.net/Properties/launchSettings.json...
Building...
warn: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[35]
      No XML encryptor configured. Key {61616dd4-7661-4451-b75e-7d452e2bf4c2} may be persisted to storage in unencrypted form.
info: Microsoft.Hosting.Lifetime[14]
      Now listening on: http://0.0.0.0:5000
info: Microsoft.Hosting.Lifetime[0]
      Application started. Press Ctrl+C to shut down.
info: Microsoft.Hosting.Lifetime[0]
      Hosting environment: Development
info: Microsoft.Hosting.Lifetime[0]
      Content root path: /home/freebsd/asp.net
  任意のクライアントコンピューターで Web アクセスして、以下のようなページが表示されれば OK です。
関連コンテンツ