NET (And .NET Core) - Introduction and Overview - .NET - Microsoft Learn
NET (And .NET Core) - Introduction and Overview - .NET - Microsoft Learn
.NET is a free , cross-platform, open-source developer platform for building many kinds
of applications. .NET is built on a high-performance runtime that is used in production by
many high-scale apps .
Cloud apps
Desktop apps
Games
Mobile apps
Windows apps
Machine learning
Internet of Things (IoT)
Features
.NET features allow developers to productively write reliable and performant code.
Asynchronous code
Attributes
Reflection
https://learn.microsoft.com/en-us/dotnet/core/introduction 1/9
25/10/23, 22:34 .NET (and .NET Core) - introduction and overview - .NET | Microsoft Learn
Code analyzers
Delegates and lambdas
Events
Exceptions
Garbage collection
Generic types
LINQ (Language Integrated Query).
Parallel programming and Managed threading
Type inference - C#, F#, Visual Basic.
Type system
Unsafe code
Using .NET
.NET apps and libraries are built from source code and a project file, using the .NET CLI or
an Integrated Development Environment (IDE) like Visual Studio .
Project file:
XML
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
</PropertyGroup>
</Project>
Source code:
C#
Console.WriteLine("Hello, World!");
The app can be built and run with the .NET CLI:
.NET CLI
https://learn.microsoft.com/en-us/dotnet/core/introduction 2/9
25/10/23, 22:34 .NET (and .NET Core) - introduction and overview - .NET | Microsoft Learn
dotnet run
Hello, World!
Binary distributions
.NET SDK: Set of tools, libraries, and runtimes for development, building, and testing
apps.
.NET Runtimes : Set of runtimes and libraries, for running apps.
.NET source and binaries are licensed with the MIT license . Additional licenses apply on
Windows for binary distributions.
Support
Microsoft supports .NET on Android, Apple, Linux, and Windows operating systems. It
can be used on Arm64, x64, and x86 architectures. It's also supported in emulated
environments, like macOS Rosetta 2 .
New versions of .NET are released annually in November. .NET releases in odd-numbered
years are Long-Term Support (LTS) releases and are supported for three years. Releases in
even-numbered years are Standard-Term Support (STS) releases and are supported for 18
months. The quality level, breaking change policies, and all other aspects of the releases
are the same. For more information, see Releases and support.
The .NET Team at Microsoft works collaboratively with other organizations to distribute and
support .NET in various ways.
https://learn.microsoft.com/en-us/dotnet/core/introduction 3/9
25/10/23, 22:34 .NET (and .NET Core) - introduction and overview - .NET | Microsoft Learn
Runtime
The Common Language Runtime (CLR) is the foundation all .NET apps are built on. The
fundamental features of the runtime are:
Garbage collection.
Memory safety and type safety.
High level support for programming languages.
Cross-platform design.
.NET is sometimes called a "managed code" runtime. It's called managed primarily because
it uses a garbage collector for memory management and because it enforces type and
memory safety. The CLR virtualizes (or abstracts) various operating system and hardware
concepts, such as memory, threads, and exceptions.
The CLR was designed to be a cross-platform runtime from its inception. It has been ported
to multiple operating systems and architectures. Cross-platform .NET code typically does
not need to be recompiled to run in new environments. Instead, you just need to install a
different runtime to run your app.
The runtime exposes various diagnostics services and APIs for debuggers, dumps and
tracing tools, and observability. The observability implementation is primarily built around
OpenTelemetry , enabling flexible application monitoring and site reliability
engineering (SRE).
The runtime offers low-level C-style interop functionality, via a combination of P/Invoke,
value types, and the ability to blit values across the native/managed-code boundary.
Languages
The runtime is designed to support multiple programming languages. C#, F#, and Visual
Basic languages are supported by Microsoft and are designed in collaboration with the
community.
Visual Basic uses a more verbose syntax that is closer to ordinary human language. It
can be an easier language to learn for people new to programming.
Compilation
.NET apps (as written in a high-level language like C#) are compiled into an Intermediate
Language (IL) . IL is a compact code format that can be supported on any operating
system or architecture. Most .NET apps use APIs that are supported in multiple
environments, requiring only the .NET runtime to run.
IL needs to be compiled to native code to execute on a CPU, for example, Arm64 or x64.
.NET supports both Ahead-Of-Time (AOT) and Just-In-Time (JIT) compilation models.
On Android, macOS, and Linux, JIT compilation is the default, and AOT is optional (for
example, with ReadyToRun).
On iOS, AOT is mandatory (except when running in the simulator).
In WebAssembly (Wasm) environments, AOT is mandatory.
The advantage of the JIT is that it can compile an app (unmodified) to the CPU instructions
and calling conventions in a given environment, per the underlying operating system and
hardware. It can also compile code at higher or lower levels of quality to enable better
startup and steady-state throughput performance.
The advantage of AOT is that it provides the best app startup and can (in some cases) result
in smaller deployments. The primary downside is that binaries must be built for each
separate deployment target (the same as any other native code). AOT code is not
compatible with some reflection patterns.
Runtime libraries
.NET has a comprehensive standard set of class libraries. These libraries provide
implementations for many general-purpose and workload-specific types and utility
functionality.
https://learn.microsoft.com/en-us/dotnet/core/introduction 5/9
25/10/23, 22:34 .NET (and .NET Core) - introduction and overview - .NET | Microsoft Learn
Here are some examples of types defined in the .NET runtime libraries:
Tools
The .NET SDK is a set of libraries and tools for developing and running .NET applications. It
includes the MSBuild build engine, the Roslyn (C# and Visual Basic) compiler, and the
F# compiler. Most commands are run by using the dotnet command. The CLI tools can
be used for local development and continuous integration.
The Visual Studio family of IDEs offer excellent support for .NET and the C#, F#, and
Visual Basic languages.
Notebooks
.NET Interactive is a group of CLI tools and APIs that enable users to create interactive
experiences across the web, markdown, and notebooks.
https://learn.microsoft.com/en-us/dotnet/core/introduction 6/9
25/10/23, 22:34 .NET (and .NET Core) - introduction and overview - .NET | Microsoft Learn
CI/CD
MSBuild and the .NET CLI can be used with various continuous integration tools and
environments, such as:
GitHub Actions
GitHub Actions and .NET
Azure DevOps
CAKE for C#
FAKE for F#
For more information, see Use the .NET SDK in Continuous Integration (CI) environments.
Deployment models
.NET apps can be published in two different modes:
Self-contained apps include the .NET runtime and dependent libraries. They can be
single-file or multi-file. Users of the application can run it on a machine that doesn't
have the .NET runtime installed. Self-contained apps always target a single operating
system and architecture configuration.
Framework-dependent apps require a compatible version of the .NET runtime, typically
installed globally. Framework-dependent apps can be published for a single operating
system and architecture configuration or as "portable," targeting all supported
configurations.
.NET apps are launched with a native executable, by default. The executable is both
operating-system and architecture-specific. Apps can also be launched with the dotnet
command.
Apps can be deployed in containers. Microsoft provides container images for various
target environments.
https://learn.microsoft.com/en-us/dotnet/core/introduction 7/9
25/10/23, 22:34 .NET (and .NET Core) - introduction and overview - .NET | Microsoft Learn
.NET history
In 2002, Microsoft released .NET Framework, a development platform for creating Windows
apps. Today .NET Framework is at version 4.8 and remains fully supported by Microsoft .
New .NET versions continue to be released annually, each a major version number higher.
They include significant new features and often enable new scenarios.
.NET ecosystem
There are multiple variants of .NET, each supporting a different type of app. The reason for
multiple variants is part historical, part technical.
Next steps
Choose a .NET tutorial
Try .NET in your browser
Take a tour of C#
Take a tour of F#
6 Collaborate with us on
.NET feedback
https://learn.microsoft.com/en-us/dotnet/core/introduction 8/9
25/10/23, 22:34 .NET (and .NET Core) - introduction and overview - .NET | Microsoft Learn
https://learn.microsoft.com/en-us/dotnet/core/introduction 9/9