Verification done... all OK: #0. Installation: root@Jdotnet1983380:~# apt install dotnet6 Reading package lists... Done Building dependency tree... Done Reading state information... Done The following additional packages will be installed: aspnetcore-runtime-6.0 aspnetcore-targeting-pack-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 dotnet-templates-6.0 liblttng-ust-common1 liblttng-ust-ctl5 liblttng-ust1 libunwind-13 netstandard-targeting-pack-2.1 The following NEW packages will be installed: aspnetcore-runtime-6.0 aspnetcore-targeting-pack-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 dotnet-templates-6.0 dotnet6 liblttng-ust-common1 liblttng-ust-ctl5 liblttng-ust1 libunwind-13 netstandard-targeting-pack-2.1 0 upgraded, 15 newly installed, 0 to remove and 1 not upgraded. Need to get 124 MB of archives. After this operation, 454 MB of additional disk space will be used. Do you want to continue? [Y/n] Get:1 http://archive.ubuntu.com/ubuntu jammy-proposed/universe amd64 dotnet-host amd64 6.0.108-0ubuntu1~22.04.1 [156 kB] Get:2 http://archive.ubuntu.com/ubuntu jammy-proposed/universe amd64 dotnet-hostfxr-6.0 amd64 6.0.108-0ubuntu1~22.04.1 [154 kB] Get:3 http://archive.ubuntu.com/ubuntu jammy/main amd64 libunwind-13 amd64 1:13.0.1-2ubuntu2 [20.8 kB] Get:4 http://archive.ubuntu.com/ubuntu jammy/main amd64 liblttng-ust-common1 amd64 2.13.1-1ubuntu1 [27.1 kB] Get:5 http://archive.ubuntu.com/ubuntu jammy/main amd64 liblttng-ust-ctl5 amd64 2.13.1-1ubuntu1 [77.9 kB] Get:6 http://archive.ubuntu.com/ubuntu jammy/main amd64 liblttng-ust1 amd64 2.13.1-1ubuntu1 [190 kB] Get:7 http://archive.ubuntu.com/ubuntu jammy-proposed/universe amd64 dotnet-runtime-6.0 amd64 6.0.108-0ubuntu1~22.04.1 [23.7 MB] Get:8 http://archive.ubuntu.com/ubuntu jammy-proposed/universe amd64 aspnetcore-runtime-6.0 amd64 6.0.108-0ubuntu1~22.04.1 [8090 kB] Get:9 http://archive.ubuntu.com/ubuntu jammy-proposed/universe amd64 aspnetcore-targeting-pack-6.0 amd64 6.0.108-0ubuntu1~22.04.1 [1445 kB] Get:10 http://archive.ubuntu.com/ubuntu jammy-proposed/universe amd64 dotnet-apphost-pack-6.0 amd64 6.0.108-0ubuntu1~22.04.1 [3735 kB] Get:11 http://archive.ubuntu.com/ubuntu jammy-proposed/universe amd64 dotnet-targeting-pack-6.0 amd64 6.0.108-0ubuntu1~22.04.1 [2238 kB] Get:12 http://archive.ubuntu.com/ubuntu jammy-proposed/universe amd64 dotnet-templates-6.0 amd64 6.0.108-0ubuntu1~22.04.1 [2545 kB] Get:13 http://archive.ubuntu.com/ubuntu jammy-proposed/universe amd64 netstandard-targeting-pack-2.1 amd64 6.0.108-0ubuntu1~22.04.1 [1399 kB] Get:14 http://archive.ubuntu.com/ubuntu jammy-proposed/universe amd64 dotnet-sdk-6.0 amd64 6.0.108-0ubuntu1~22.04.1 [80.2 MB] Get:15 http://archive.ubuntu.com/ubuntu jammy-proposed/universe amd64 dotnet6 amd64 6.0.108-0ubuntu1~22.04.1 [20.5 kB] Fetched 124 MB in 10s (11.9 MB/s) Selecting previously unselected package dotnet-host. (Reading database ... 33911 files and directories currently installed.) Preparing to unpack .../00-dotnet-host_6.0.108-0ubuntu1~22.04.1_amd64.deb ... Unpacking dotnet-host (6.0.108-0ubuntu1~22.04.1) ... Selecting previously unselected package dotnet-hostfxr-6.0. Preparing to unpack .../01-dotnet-hostfxr-6.0_6.0.108-0ubuntu1~22.04.1_amd64.deb ... Unpacking dotnet-hostfxr-6.0 (6.0.108-0ubuntu1~22.04.1) ... Selecting previously unselected package libunwind-13:amd64. Preparing to unpack .../02-libunwind-13_1%3a13.0.1-2ubuntu2_amd64.deb ... Unpacking libunwind-13:amd64 (1:13.0.1-2ubuntu2) ... Selecting previously unselected package liblttng-ust-common1:amd64. Preparing to unpack .../03-liblttng-ust-common1_2.13.1-1ubuntu1_amd64.deb ... Unpacking liblttng-ust-common1:amd64 (2.13.1-1ubuntu1) ... Selecting previously unselected package liblttng-ust-ctl5:amd64. Preparing to unpack .../04-liblttng-ust-ctl5_2.13.1-1ubuntu1_amd64.deb ... Unpacking liblttng-ust-ctl5:amd64 (2.13.1-1ubuntu1) ... Selecting previously unselected package liblttng-ust1:amd64. Preparing to unpack .../05-liblttng-ust1_2.13.1-1ubuntu1_amd64.deb ... Unpacking liblttng-ust1:amd64 (2.13.1-1ubuntu1) ... Selecting previously unselected package dotnet-runtime-6.0. Preparing to unpack .../06-dotnet-runtime-6.0_6.0.108-0ubuntu1~22.04.1_amd64.deb ... Unpacking dotnet-runtime-6.0 (6.0.108-0ubuntu1~22.04.1) ... Selecting previously unselected package aspnetcore-runtime-6.0. Preparing to unpack .../07-aspnetcore-runtime-6.0_6.0.108-0ubuntu1~22.04.1_amd64.deb ... Unpacking aspnetcore-runtime-6.0 (6.0.108-0ubuntu1~22.04.1) ... Selecting previously unselected package aspnetcore-targeting-pack-6.0. Preparing to unpack .../08-aspnetcore-targeting-pack-6.0_6.0.108-0ubuntu1~22.04.1_amd64.deb ... Unpacking aspnetcore-targeting-pack-6.0 (6.0.108-0ubuntu1~22.04.1) ... Selecting previously unselected package dotnet-apphost-pack-6.0. Preparing to unpack .../09-dotnet-apphost-pack-6.0_6.0.108-0ubuntu1~22.04.1_amd64.deb ... Unpacking dotnet-apphost-pack-6.0 (6.0.108-0ubuntu1~22.04.1) ... Selecting previously unselected package dotnet-targeting-pack-6.0. Preparing to unpack .../10-dotnet-targeting-pack-6.0_6.0.108-0ubuntu1~22.04.1_amd64.deb ... Unpacking dotnet-targeting-pack-6.0 (6.0.108-0ubuntu1~22.04.1) ... Selecting previously unselected package dotnet-templates-6.0. Preparing to unpack .../11-dotnet-templates-6.0_6.0.108-0ubuntu1~22.04.1_amd64.deb ... Unpacking dotnet-templates-6.0 (6.0.108-0ubuntu1~22.04.1) ... Selecting previously unselected package netstandard-targeting-pack-2.1. Preparing to unpack .../12-netstandard-targeting-pack-2.1_6.0.108-0ubuntu1~22.04.1_amd64.deb ... Unpacking netstandard-targeting-pack-2.1 (6.0.108-0ubuntu1~22.04.1) ... Selecting previously unselected package dotnet-sdk-6.0. Preparing to unpack .../13-dotnet-sdk-6.0_6.0.108-0ubuntu1~22.04.1_amd64.deb ... Unpacking dotnet-sdk-6.0 (6.0.108-0ubuntu1~22.04.1) ... Selecting previously unselected package dotnet6. Preparing to unpack .../14-dotnet6_6.0.108-0ubuntu1~22.04.1_amd64.deb ... Unpacking dotnet6 (6.0.108-0ubuntu1~22.04.1) ... Setting up dotnet-host (6.0.108-0ubuntu1~22.04.1) ... Installing new version of config file /etc/profile.d/dotnet.sh ... update-alternatives: using /usr/lib/dotnet/dotnet6-6.0.108/dotnet to provide /usr/bin/dotnet (dotnet) in auto mode update-alternatives: warning: skip creation of /usr/share/bash-completion/completions/dotnet because associated file /usr/lib/dotnet/dotnet6-6.0 .108/bash-completion/completions/dotnet (of link group dotnet) doesn't exist Setting up dotnet-apphost-pack-6.0 (6.0.108-0ubuntu1~22.04.1) ... Setting up netstandard-targeting-pack-2.1 (6.0.108-0ubuntu1~22.04.1) ... Setting up liblttng-ust-common1:amd64 (2.13.1-1ubuntu1) ... Setting up dotnet-targeting-pack-6.0 (6.0.108-0ubuntu1~22.04.1) ... Setting up libunwind-13:amd64 (1:13.0.1-2ubuntu2) ... Setting up aspnetcore-targeting-pack-6.0 (6.0.108-0ubuntu1~22.04.1) ... Setting up liblttng-ust-ctl5:amd64 (2.13.1-1ubuntu1) ... Setting up dotnet-hostfxr-6.0 (6.0.108-0ubuntu1~22.04.1) ... Setting up dotnet-templates-6.0 (6.0.108-0ubuntu1~22.04.1) ... Setting up liblttng-ust1:amd64 (2.13.1-1ubuntu1) ... Setting up dotnet-runtime-6.0 (6.0.108-0ubuntu1~22.04.1) ... Setting up aspnetcore-runtime-6.0 (6.0.108-0ubuntu1~22.04.1) ... Setting up dotnet-sdk-6.0 (6.0.108-0ubuntu1~22.04.1) ... Setting up dotnet6 (6.0.108-0ubuntu1~22.04.1) ... Processing triggers for libc-bin (2.35-0ubuntu3.1) ... Scanning processes... No services need to be restarted. No containers need to be restarted. No user sessions are running outdated binaries. No VM guests are running outdated hypervisor (qemu) binaries on this host. root@Jdotnet1983380:~# dpkg -l | grep "NET\|asp" ii aspnetcore-runtime-6.0 6.0.108-0ubuntu1~22.04.1 amd64 ASP dotNET Core runtime ii aspnetcore-targeting-pack-6.0 6.0.108-0ubuntu1~22.04.1 amd64 Internal - targeting pack for Microsoft.AspNetCore.App 6.0 ii dotnet-apphost-pack-6.0 6.0.108-0ubuntu1~22.04.1 amd64 Internal - targeting pack for Microsoft.NETCore.App 6.0 ii dotnet-host 6.0.108-0ubuntu1~22.04.1 amd64 dotNET host command line ii dotnet-hostfxr-6.0 6.0.108-0ubuntu1~22.04.1 amd64 dotNET host resolver ii dotnet-runtime-6.0 6.0.108-0ubuntu1~22.04.1 amd64 dotNET runtime ii dotnet-sdk-6.0 6.0.108-0ubuntu1~22.04.1 amd64 dotNET 6.0 Software Development Kit ii dotnet-targeting-pack-6.0 6.0.108-0ubuntu1~22.04.1 amd64 Internal - targeting pack for Microsoft.NETCore.App 6.0 ii dotnet-templates-6.0 6.0.108-0ubuntu1~22.04.1 amd64 dotNET 6.0 templates ii dotnet6 6.0.108-0ubuntu1~22.04.1 amd64 dotNET CLI tools and runtime ii netstandard-targeting-pack-2.1 6.0.108-0ubuntu1~22.04.1 amd64 Internal - targeting pack for NETStandard.Library 2.1 root@Jdotnet1983380:~# #1. Basic commands checking root@Jdotnet1983380:~# dotnet --info .NET SDK (reflecting any global.json): Version: 6.0.108 Commit: 4e3a463d2b Runtime Environment: OS Name: ubuntu OS Version: 22.04 OS Platform: Linux RID: ubuntu.22.04-x64 Base Path: /usr/lib/dotnet/dotnet6-6.0.108/sdk/6.0.108/ global.json file: Not found Host: Version: 6.0.8 Architecture: x64 Commit: 55fb7ef977 .NET SDKs installed: 6.0.108 [/usr/lib/dotnet/dotnet6-6.0.108/sdk] .NET runtimes installed: Microsoft.AspNetCore.App 6.0.8 [/usr/lib/dotnet/dotnet6-6.0.108/shared/Microsoft.AspNetCore.App] Microsoft.NETCore.App 6.0.8 [/usr/lib/dotnet/dotnet6-6.0.108/shared/Microsoft.NETCore.App] Download .NET: https://aka.ms/dotnet-download Learn about .NET Runtimes and SDKs: https://aka.ms/dotnet/runtimes-sdk-info root@Jdotnet1983380:~# root@Jdotnet1983380:~# dotnet --version 6.0.108 root@Jdotnet1983380:~# dotnet sdk check .NET SDKs: Version Status ------------------------ 6.0.108 Up to date. Try out the newest .NET SDK features with .NET 7.0.100-preview.6.22352.1. .NET Runtimes: Name Version Status ------------------------------------------------------ Microsoft.AspNetCore.App 6.0.8 Up to date. Microsoft.NETCore.App 6.0.8 Up to date. The latest versions of .NET can be installed from https://aka.ms/dotnet-core-download. For more information about .NET lifecycles, see https://aka.ms/dotnet-core-support. root@Jdotnet1983380:~# #2. Checking console, solution and project commands #2.1-2.5 root@Jdotnet1983380:~# dotnet new console --name Testing The template "Console App" was created successfully. Processing post-creation actions... Running 'dotnet restore' on /root/Testing/Testing.csproj... Determining projects to restore... Restored /root/Testing/Testing.csproj (in 77 ms). Restore succeeded. root@Jdotnet1983380:~# cd Testing/ root@Jdotnet1983380:~/Testing# dotnet new sln The template "Solution File" was created successfully. root@Jdotnet1983380:~/Testing# dotnet sln Testing.sln add Testing.csproj Project `Testing.csproj` added to the solution. root@Jdotnet1983380:~/Testing# dotnet build Testing.sln Microsoft (R) Build Engine version 17.0.0+c9eb9dd64 for .NET Copyright (C) Microsoft Corporation. All rights reserved. Determining projects to restore... All projects are up-to-date for restore. Testing -> /root/Testing/bin/Debug/net6.0/Testing.dll Build succeeded. 0 Warning(s) 0 Error(s) Time Elapsed 00:00:01.94 root@Jdotnet1983380:~/Testing# bin/Debug/net6.0/Testing Hello, World! #2.6-2.8 root@Jdotnet1983380:~/Testing# cat <Program.cs using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Google.Apis; namespace TestProject { class Program { static void Main(string[] args) { Stack myStack = new Stack(); var th = new Thread(()=>WaitAndPrint(myStack)); th.Start(); Console.WriteLine("Me first!"); myStack.Push(1); Console.WriteLine("Finished tasks: {0}", myStack.Count); Thread.Sleep(1000); Console.WriteLine("Finished tasks: {0}", myStack.Count); } private static void WaitAndPrint(Stack myStack){ Thread.Sleep(1000); Console.WriteLine("Me second!"); myStack.Push(2); } } } EOF root@Jdotnet1983380:~/Testing# dotnet add Testing.csproj package Google.Apis Determining projects to restore... Writing /tmp/tmpNFrq62.tmp info : Adding PackageReference for package 'Google.Apis' into project 'Testing.csproj'. info : GET https://api.nuget.org/v3/registration5-gz-semver2/google.apis/index.json info : OK https://api.nuget.org/v3/registration5-gz-semver2/google.apis/index.json 915ms info : Restoring packages for /root/Testing/Testing.csproj... info : Package 'Google.Apis' is compatible with all the specified frameworks in project 'Testing.csproj'. info : PackageReference for package 'Google.Apis' version '1.57.0' added to file '/root/Testing/Testing.csproj'. info : Committing restore... info : Writing assets file to disk. Path: /root/Testing/obj/project.assets.json log : Restored /root/Testing/Testing.csproj (in 88 ms). root@Jdotnet1983380:~/Testing# dotnet run Me first! Finished tasks: 1 Me second! Finished tasks: 2 root@Jdotnet1983380:~/Testing# dotnet remove Testing.csproj package Google.Apis info : Removing PackageReference for package 'Google.Apis' from project 'Testing.csproj'. root@Jdotnet1983380:~/Testing# dotnet run /root/Testing/Program.cs(6,7): error CS0246: The type or namespace name 'Google' could not be found (are you missing a using directive or an assembly reference?) [/root/Testing/Testing.csproj] The build failed. Fix the build errors and run again. root@Jdotnet1983380:~/Testing#