Skip to main content

.NET

Pronunciation
dot-NET
Updated 2 min read

Share this page

Send the link, quote the definition with a link back, or show it as a card on your own site.

https://softwaredictionary.org/terms/dotnet

In short

.NET is Microsoft's free, open-source developer platform for building web, desktop, mobile, cloud and game applications, mainly in C#.

What is .NET?

The original .NET Framework appeared in 2002 and ran only on Windows. In 2016 Microsoft released .NET Core, a rewrite that was open source and ran on Windows, Linux and macOS. In 2020 the two lines were unified as .NET 5, and since then a new version ships every November, with even-numbered releases supported for longer as LTS versions.

Code written in C#, F# or Visual Basic compiles to an intermediate language that runs on the common language runtime (CLR), which compiles it to machine code just in time, manages memory with a garbage collector and enforces type safety. Ahead-of-time compilation is also available for fast startup and small containers.

For web work, ASP.NET Core provides minimal APIs and controllers for REST services, Razor Pages and MVC for server-rendered sites, Blazor for interactive web UIs in C#, and SignalR for real-time features. Entity Framework Core is the main ORM, and NuGet is the package manager. Beyond the web, .NET powers desktop apps, cross-platform mobile apps and many games through Unity.

A common misconception is that .NET is Windows-only and closed source. That describes the old .NET Framework, which still exists for legacy apps. Modern .NET is open source on GitHub, runs on Linux servers and in containers, and performs very well in independent benchmarks.

Key takeaways

  • .NET is Microsoft's open-source platform for many kinds of apps, mainly in C#.
  • .NET Core in 2016 made it cross-platform; .NET 5 in 2020 unified the line.
  • Code runs on the CLR, which JIT-compiles it and manages memory.
  • ASP.NET Core builds APIs and web apps; EF Core is the ORM.
  • The legacy .NET Framework is Windows-only; modern .NET is not.

Example

A minimal API in ASP.NET Corecsharp
var builder = WebApplication.CreateBuilder(args);
var app = builder.Build();

var books = new List<Book> { new(1, "Dune") };

app.MapGet("/books/{id:int}", (int id) =>
    books.FirstOrDefault(b => b.Id == id) is { } book
        ? Results.Ok(book)
        : Results.NotFound());

app.MapPost("/books", (Book book) =>
{
    books.Add(book);
    return Results.Created($"/books/{book.Id}", book);
});

app.Run();

record Book(int Id, string Title);

Readers ask

What is the difference between .NET and .NET Framework?

.NET Framework is the original Windows-only version, now in maintenance mode. .NET, formerly .NET Core, is the modern, cross-platform and open-source successor, where all new development happens.

What is ASP.NET Core?

The web framework of modern .NET. It is used to build REST APIs, server-rendered websites, real-time apps and Blazor web interfaces.

Is .NET only for C#?

No. C# is by far the most used, but F# and Visual Basic also run on .NET, and all of them can use the same libraries.

See also

Spotted a mistake or something missing on this page?Suggest an edit

Read a random page
Open today's review
Switch to the dark theme
Read this page in Türkçe

More

Settings