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

BeginnerConcept.NET builds (dotnet CLI)
Answer

Short answer

.NET Framework (versions 1.0–4.8) is the original, Windows-only platform; its web apps run on IIS. Modern .NET (.NET Core 1–3.1, then .NET 5, 6, 7, 8, 9…) is open source and cross-platform — it runs on Linux, macOS and Windows, in Docker and on Kubernetes. All new development uses modern .NET.

How to tell which one a project uses

<TargetFramework>net8.0</TargetFramework>        <!-- modern .NET → Linux containers OK -->
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>  <!-- .NET Framework → Windows only -->

Why DevOps cares

.NET Framework 4.x Modern .NET (6/8/9)
OS Windows only Linux, Windows, macOS
Containers Windows containers (huge) Small Linux images
Hosting IIS Kestrel, behind Nginx/Ingress/App Service
Build tool MSBuild / Visual Studio dotnet CLI

Migrating Framework apps to modern .NET is a common modernisation project because it unlocks Linux containers and Kubernetes.

What to say in the interview

"Framework is the legacy Windows-only runtime hosted on IIS; modern .NET like .NET 8 is cross-platform and container-friendly. If the csproj targets net8.0, we can build it with the dotnet CLI and run it in Linux containers."

All Build Tools (Java, Node.js, Python, .NET) questions Roadmap: .NET apps: dotnet build & publish

More on .NET builds (dotnet CLI)