FreeBSD 14
Sponsored Link

.NET 8.0 : Install2024/08/23

 

Install .NET 8.0.

[1] Install .NET 8.0 and run helloworld sample app.
root@dlp:~ #
pkg install -y dotnet
root@dlp:~ #
dotnet --version

8.0.106

# verify to create Hello World

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


Welcome to .NET 8.0!
---------------------
SDK Version: 8.0.106

----------------
Installed an ASP.NET Core HTTPS development certificate.
To trust the certificate, view the instructions: https://aka.ms/dotnet-https-linux

----------------
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:
  Determining projects to restore...
  Restored /root/helloworld/helloworld.csproj (in 1.28 sec).
Restore succeeded.

root@dlp:~ #
cd helloworld

root@dlp:~/helloworld#
dotnet run

Hello, World!
[2] Try to create ASP.NET sample app with any common user.
freebsd@dlp:~ $
dotnet new razor -o asp.net


Welcome to .NET 8.0!
---------------------
SDK Version: 8.0.106

----------------
Installed an ASP.NET Core HTTPS development certificate.
To trust the certificate, view the instructions: https://aka.ms/dotnet-https-linux

----------------
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/8.0-third-party-notices for details.

Processing post-creation actions...
Restoring /home/freebsd/asp.net/asp.net.csproj:
  Determining projects to restore...
  Restored /home/freebsd/asp.net/asp.net.csproj (in 393 ms).
Restore succeeded.

freebsd@dlp:~ $
cd asp.net

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

Building...
warn: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[35]
      No XML encryptor configured. Key {53fa6856-ac73-485a-b871-e344372abbb0} 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
  Access to the URL you set from any client computer, and then that's OK if following site is shown.
Matched Content