Chapter 2. Getting Started: From Zero to “Hello World” in One Chapter

From Zero to “Hello World” in One Chapter

One of the benefits of .NET Core is the ability to get a simple console application up and running in a matter of seconds. While more complex applications require a deeper understanding of the framework and the language (C#, in our case), the building and execution of a simple “Hello World” application can be done with very little effort. This chapter will get you up and running in one quick session.

Associated Source Code

The source code can be found in the /NetOnLinuxBook/HelloWorld/ directory.

Overview of .NET

When Microsoft introduced the .NET Framework in 2002, it marked a new era in software development for Microsoft-centric developers. The move marked a shift in thinking, allowing Windows Forms developers to create websites in a way that was somewhat familiar. Dragging text areas and buttons onto a form and adding code-behind code made the transition almost seamless, if somewhat unconventional. In fact, it was sometimes referred to as “Windows for the Web.”

Fast-forward 12 years, and Microsoft announces that .NET will be open source. It now supports MVC, ORM, CSS, and every other TLA (three-letter acronym) one can imagine.

What happened?

In short, as has been said, “Open source won.”

With the fight over, Microsoft has pivoted quickly and is now releasing pieces of the .NET framework at a much faster pace, with thousands of developers from all over the world ...

Get Transitioning to .NET Core on Red Hat Enterprise Linux now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.