The .NET application platform is Microsoft’s bet for developing desktop applications, web services, and mobile applications, being one of the most widely used development technologies at the moment.
Released on November 8, 2021, .NET 6 is the new LTS (long-term support) version, which comes to replace .NET Core 3 and finalize the work started with .NET 5, especially in terms of unification.
Precisely, this is one of the strong points of .NET 6, achieving convergence between .NET technologies and unification across architectures and operating systems.
This means .NET 6 can run natively on different architectures and operating systems. Thus, .NET 6 is natively compatible with Windows, Linux, Android, and macOS (among others), and x86, x64, ARM32, and ARM64 processors.
Other improvements include performance enhancements, support for C# version 10, improvements for simplifying development, and productivity improvements in development. In addition to MAUI, which will allow us to create graphical applications with a unified UI.
The next LTS version of .NET will be version 8, whose date is not expected until November 2023. So, for a while, .NET 6 will be the “preferred” version for development with Microsoft technology.
In this post, we are going to introduce the use of .NET 6 with a simple example, a “Hello World” application, run on a Windows system.
In future posts, we will delve deeper into the topic, especially in the use of Linux and Raspberry Pi, which is one of the most interesting aspects of .NET 6.
Installing .NET 6 SDK
Logically, we will need to have .NET 6 installed. This comes with the “dotnet” executable, a CLI application that allows us to create and manage projects.
In the case of Windows, installing Visual Studio Community will have everything installed, so generally we won’t need to install anything else.
However, we can always install .NET by downloading the appropriate version from the official website. https://dotnet.microsoft.com/en-us/download/dotnet
Check that we have dotnet installed
First, it’s a good idea to make sure you have everything installed correctly. This is as simple as doing,
dotnet —version
If we have everything correctly installed
![]()
Create a new application with Dotnet
To create a console application we use the command
dotnet new Whereis the type of project we want to create. For example, this is how we would make a console application called “holaMundo” dotnet new console -o holaMundo Examples of templates are console, classlib, wpf, xunit, web, webapp, webapi. You have a list of standard templates at this link https://docs.microsoft.com/es-es/dotnet/core/tools/dotnet-new. To check the templates we have installed we can do, dotnet new —list To install an additional template we would simply do, dotnet new install Once our project is created, we can edit it with our favorite IDE. Normally on Windows we will work with Visual Studio, which as we know has a Community version that you can use freely in non-commercial projects. On other platforms like Linux, and even on Windows itself, Visual Studio Code is also very popular as a lightweight development environment. In any case, any text editor will work for us. So, use the one you like best. When opening the ‘Program.cs’ file we will see the content of our “Hello world”. This simple example simply has one line that prints “Hello, World!” Console.WriteLine(“Hello, World!”); To run the application we simply have to go to our project directory and execute the ‘run’ command cd holaMundo dotnet run We will see that, indeed, the message is displayed on the command line. When doing ‘run’, the .NET environment we have installed on the machine will be used. Therefore, it will not work if we move it to another machine that does not have .NET installed. To create a standalone executable, which does not need .NET installed on the machine where we are going to run it, we must publish it with the ‘publish’ command. dotnet publish -c Where For example, we can do dotnet publish -c release -r linux-x64 In the following posts, we will delve deeper into the use of .NET 6 and see how to install it on different machines, with different operating systems. Especially on Linux and Android. And, knowing us, we know that we will end up installing it on a mini-PC like a Raspberry Pi. But that will be in future posts. See you next time!Edit a .NET6 application
Run the application
![]()
Create a standalone executable

