Explain in detail the introduction and differences of DotNet Core, DotNet5, DotNet6 and DotNet7

.NET is a free and open source development platform for building multiple applications, web applications, web APIs and microservices, serverless functions in the cloud, cloud-native applications, mobile applications can be developed using multiple languages, editors and libraries , Desktop Apps, Windows WPF, Windows Forms, Universal Windows Platform (UWP), Gaming, Internet of Things (IoT), Machine Learning, Console Apps, Windows Services. Frameworks mainly include: .NET Framework, .NET Standard, .NET Core, .NET 5/6/7. This book mainly introduces the introduction and differences of .NET Core, .NET 5, .NET 6 and .NET 7.

1、.NET Core

.NET Core is a free, open-source hosted computer software framework for Windows, Linux and macOS. It is the first official version developed by Microsoft and has a cross-platform capability application development framework (Application Framework).

.NET Core is composed of many projects. In addition to the basic class library (Core FX), it also includes the runtime platform Core CLR compiled by RyuJIT, the compiler platform .NET Compiler Platform, and the package optimized by AOT compilation technology. Core RT (.NET Core Runtime), and cross-platform MSIL compiler LLILC (LLVM-based MSIL Compiler) and other projects. NET Core 3.1 is a long-term support (LTS) release and will be supported for three years.

NET Core 3.1 supported platforms:

  • Alpine: 3.10+

  • Debian: 9+

  • Ubuntu: 16.04+

  • Fedora: 29+

  • cents: 7+

  • RHEL: 6+

  • openSUSE: 15+

  • SUSE Enterprise Linux (SLES): 12 SP2+

  • macOS: 10.13+

  • Windows Client: 7, 8.1, 10 (1607+)

  • Windows Server: 2012 R2+

Note: Windows Forms and WPF applications only run and are supported on Windows.

CPU architecture support:

  • x64 supports Windows, macOS, and Linux

  • x86 supports Windows

  • ARM32 supports Windows and Linux

  • ARM64 supports Linux (kernel 4.14+)

Note: You need to ensure that .NET Core 3.1 ARM64 deployments use Linux kernel version 4.14 or later. For example, Ubuntu 18.04 meets this requirement, but 16.04 does not.

Reference Documentation: Announcing .NET Core 3.1 - .NET Blog

2、.NET 5

.NET 5 is an important version of the next generation of .NET Core after 3.1. Named .NET 5 for two reasons:

1) Version numbering 4.x was skipped to avoid confusion with .NET Framework 4.x.

2) Removed "Core" from the name to emphasize that this is the main future implementation of .NET. .NET 5 will support more types of apps and platforms than .NET Core or .NET Framework.

ASP.NET Core 5.0 is based on .NET 5, but keeps the name "Core" to avoid confusion with ASP.NET MVC 5. For the same reason, Entity Framework Core 5.0 has retained the name "Core" to avoid confusion with Entity Framework 5 and Entity Framework 6.

.NET 5 does not replace the .NET Framework, .NET 5 and above are the major future implementations of .NET, but .NET Framework 4.x is still supported. There are currently no plans to port the following technologies from the .NET Framework to .NET 5, but there are some alternatives in .NET:

technology

suggested alternative

web form

ASP.NET Core

Razor

or

Razor Pages

Windows Workflow (WF)

Elsa-Workflows

.NET 5 does not replace .NET Standard, and new application development can specify the net5.0 Target Framework Moniker (TFM) for all project types, including class libraries. Sharing code between .NET 5 workloads is simplified because you only need net5.0 TFM. For .NET 5 apps and libraries, net5.0 TFM merges and replaces netcoreapp and netstandard TFM. However, if you plan to share code between .NET Framework, .NET Core, and .NET 5 workloads, you can do so by specifying netstandard2.0 as your TFM.

Developers writing .NET 5 applications will have access to the latest C# versions and features. .NET 5 paired with C# 9 brings many new features to the language.

Reference Documentation: What's New in .NET 5 | Microsoft Learn

3、.NET 6

.NET 6 delivers the final piece of the .NET Unification initiative, launched in .NET 5. .NET 6 unifies the SDK, underlying libraries, and runtime across mobile, desktop, IoT, and cloud applications. In addition to this unification, the .NET 6 ecosystem provides the following capabilities:

1) Simplify development

Getting started is easy. New language features in C# 10 reduce the amount of code that needs to be written. With an investment in a web stack and a minimal API, it's easy to quickly write smaller, faster microservices.

2) Better performance

.NET 6 is the fastest full-stack web framework and reduces computing costs when running in the cloud.

3) Ultimate work efficiency

.Net 6 and Visual Studio 2022 offer hot reloading, new git tools, smart code editing, solid diagnostic and testing tools, and better team collaboration.

.NET 6 will be supported for three years as a Long Term Support (LTS) release. .NET 6 rewrites the System.IO.FileStream type to provide better performance and reliability on Windows. FileStreams now never block when created for asynchronous I/O on Windows. Per-configuration optimization (PGO) means that the JIT compiler generates optimized code based on the most commonly used types and code paths. .NET 6 introduces dynamic PGO. Dynamic PGO works with tiered compilation to further optimize code based on additional instrumentation implemented in tier 0. Dynamic PGO is disabled by default, but it can be enabled using the DOTNET_TieredPGO environment variable.

.NET 6 introduced Crossgen2, the successor to the removed Crossgen. Crossgen and Crossgen2 are tools for providing ahead-of-time (AOT) compilation, which improves application startup times. Crossgen2 is written in C# (not C++) and can perform analyzes and optimizations that were not possible in previous versions.

The .NET 6 release supports the macOS Arm64 (or "Apple Silicon") and Windows Arm64 operating systems, enabling native Arm64 execution and x64 emulation. Additionally, the x64 and Arm64 .NET installers now install side-by-side.

Using the hot reload feature, you can modify the application source code and immediately apply those changes to the running application. The purpose of this feature is to improve productivity by avoiding restarting the application between edits. Hot reload is available in Visual Studio 2022 and the dotnet watch command line tool. Hot reloading works with most types of .NET applications as well as C#, Visual Basic, and C++ source code.

Reference Documentation: What's New in .NET 6 | Microsoft Learn

4、.NET 7

.NET 7 brings higher performance and C# 11/ F# 7, .NET MAUI, ASP.NET Core/Blazor, Web api, WinForms, WPF and more to the application. With .NET 7\ it's also easy to containerize .NET 7 projects, set up CI/CD workflows in GitHub Actions, and enable cloud-native observability.

.NET remains one of the fastest, most loved and trusted platforms with a huge ecosystem of .NET packages including over 330,000 packages.

The .NET 7 release was released alongside other products, libraries and platforms, including:

  • ASP.NET Core 7

  • Entity Framework Core 7

  • .NET FIXED

  • Windows Forms

  • WPF

  • Orleans 7

Updates and optimizations include the following:

1).NET RIGHT

.NET Multi-Platform Application UI (MAUI) unifies Android, iOS, macOS, and Windows APIs into one API, allowing developers to write an application that runs natively on multiple platforms. As part of .NET 7, .NET MAUI provides a project to handle multi-targeting across devices and their platforms.

2)ARM64

ET helps developers build applications that run on ARM devices, and .NET 7 will usher in several improvements.

3) Performance

.NET 7 is the fastest .NET out there. .NET 7 brings over a thousand performance-impacting improvements to reflection, stack replacement (OSR), startup time, native AOT, loop optimization, and many other areas.

5. Differences between .NET Framework, .NET Standard, .NET Core and .NET 5/6/7

The .NET Framework can only run on Windows, but the demand for various cross-platforms has become stronger, and it cannot meet the needs of cross-platform and modularization. Microsoft extracted the cross-platform part of the .NET Framework and packaged it into a standard library, which is .NET Standard. Regardless of the system platform, the contents of the standard library are completely universal. But the unique parts of other systems are not available in Windows, so .NET Core is developed on the basis of the standard library .NET Standard. After .NET Core became stable, it was renamed to .NET 5/6/7.

1).NET Core

A free and open-source hosted computing software framework for Windows, Linux, and MacOS operating systems. Originally created to support ASP.NET Core. .NET Core runs on Windows, Linux, and macOS, and supports multiple programming languages ​​such as C#, F#, and Visual Basic.

2).NET Standard

The basic specification standard maps some assemblies of .NET Framework to .NET Core. If it is originally a version above .NET Core, there is no need to use .NET Standard.

3).NET 5/6/7

The official stable version of .NET Core also has documentation explaining how to migrate from ASP.NET Core 3.1 to 6.0.

.NET 5 is the next version of .NET Core, a unified development platform for building applications and services that runs on Windows, Linux, and macOS. .NET 5 supports multiple programming languages, including C#, F#, Visual Basic, and C++/CLI.

.NET 6 is the successor to .NET 5 and it will be released in 2021. .NET 6 will include more features and improvements such as better performance, better reliability, better security, and a better developer experience.

.NET 7 is the successor to .NET 6, and it will include more features and improvements to further improve performance, reliability, security, and developer experience.

Guess you like

Origin blog.csdn.net/lwf3115841/article/details/130456055