Learn how to get started with .NET Core, including software installations, cross-platform development, recommended tools, and step-by-step instructions for creating and running a console application. Explore the capabilities of .NET Core, such as building APIs, web applications, console applications, and class libraries. Discover ASP.NET Core middleware and the features of .NET Core CLI compared to Visual Studio.
.NET Core is a cross-platform framework that can be easily installed on various operating systems and allows developers to build a wide range of applications.
The .NET Core CLI offers a powerful developer experience with comprehensive project management commands, easier scaffolding process, and detailed documentation, making it a fantastic tooling experience for building .NET Core applications.
Deep dives
Getting Started with .NET Core
To get started with .NET Core, you need a computer running Windows 10, Mac OS, or one of the supported Linux distributions. The .NET Core runtime, SDK, compiler, and toolchains are all cross-platform. You can try .NET Core in the browser by typing your code and having it compiled in the cloud. To install .NET Core on your desktop or laptop, you can visit the .NET Core website, which provides the SDK and setup instructions. You can write .NET Core code using any text editor that saves files as plain text. Visual Studio Code is a popular choice, but there are other options available. After installing the necessary tools, you can create a .NET Core console application using the CLI. The CLI provides a rich developer experience with a wide range of commands for scaffolding and managing projects.
Types of Applications You Can Build with .NET Core
.NET Core is an implementation of the .NET standard, which means it has access to all the APIs, methods, types, and system calls outlined in the standard. This allows you to build various types of applications with .NET Core, such as Web APIs for microservices, libraries of functions, console applications, and websites using MVC, Razor, Blazor, or Spa frameworks. By targeting the .NET Standard in your class library, you can create cross-platform libraries that can be used by .NET Core, .NET Framework, Mono, Xamarin, and Unity. The versatility of .NET Core enables developers to build practically any type of application they desire.
The Developer Experience with .NET Core
The .NET Core CLI offers a comprehensive and powerful developer experience, especially when compared to using Visual Studio for Windows. The CLI provides numerous commands for creating and managing projects, which are not always readily available in Visual Studio. The scaffolding process, done using commands like 'dotnet new', is easier with the CLI, and it provides templates that may not be available in Visual Studio. The CLI also allows you to view detailed documentation for each command. Microsoft's focus on targeting Linux and Mac OS developers with the CLI has resulted in a more fully featured experience. However, Visual Studio for Windows still has its place in the .NET Framework development. Ultimately, the CLI provides a fantastic tooling experience for building .NET Core applications.