.NET 5.0 : Install2021/04/09 |
Install .NET 5.0.
|
|
[1] | It's possible to install .NET from AppStream. |
[root@dlp ~]# dnf -y install dotnet-runtime-5.0 dotnet-sdk-5.0 dotnet-targeting-pack-5.0 dotnet-templates-5.0 dotnet-hostfxr-5.0 Dependencies resolved. ================================================================================ Package Arch Version Repository Size ================================================================================ Installing: dotnet-hostfxr-5.0 x86_64 5.0.4-2.el8 appstream 155 k dotnet-runtime-5.0 x86_64 5.0.4-2.el8 appstream 27 M dotnet-sdk-5.0 x86_64 5.0.104-2.el8 appstream 48 M dotnet-targeting-pack-5.0 x86_64 5.0.4-2.el8 appstream 2.4 M dotnet-templates-5.0 x86_64 5.0.104-2.el8 appstream 2.0 M Installing dependencies: aspnetcore-runtime-5.0 x86_64 5.0.4-2.el8 appstream 6.5 M aspnetcore-targeting-pack-5.0 x86_64 5.0.4-2.el8 appstream 1.4 M dotnet-apphost-pack-5.0 x86_64 5.0.4-2.el8 appstream 3.8 M Transaction Summary ================================================================================ Install 8 Packages ..... .....[root@dlp ~]# dotnet --version 5.0.104 # verify to create Hello World [root@dlp ~]# dotnet new console -o helloworld Welcome to .NET 5.0! --------------------- SDK Version: 5.0.104 ---------------- Installed an ASP.NET Core HTTPS development certificate. To trust the certificate run 'dotnet dev-certs https --trust' (Windows and macOS only). 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 -------------------------------------------------------------------------------------- Getting ready... The template "Console Application" was created successfully. Processing post-creation actions... Running 'dotnet restore' on helloworld/helloworld.csproj... Determining projects to restore... Restored /root/helloworld/helloworld.csproj (in 97 ms). 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. |
[cent@dlp ~]$ dotnet new razor -o asp.net Welcome to .NET 5.0! --------------------- SDK Version: 5.0.212 ---------------- Installed an ASP.NET Core HTTPS development certificate. To trust the certificate run 'dotnet dev-certs https --trust' (Windows and macOS only). 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 -------------------------------------------------------------------------------------- Getting ready... The template "ASP.NET Core Web App" was created successfully. This template contains technologies from parties other than Microsoft, see https://aka.ms/aspnetcore/5.0-third-party-notices for details. Processing post-creation actions... Running 'dotnet restore' on asp.net/asp.net.csproj... Determining projects to restore... Restored /home/cent/asp.net/asp.net.csproj (in 94 ms). Restore succeeded.[cent@dlp ~]$ cd asp.net [cent@dlp asp.net]$ dotnet run --urls=http://10.0.0.30:5000/ Building... info: Microsoft.Hosting.Lifetime[0] Now listening on: http://10.0.0.30: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/cent/asp.net |
Access to the URL you set from any client computer, and then that's OK if following site is shown. |
Sponsored Link |
|