Advertisement

.NET vs .NET Framework interview questions and answers

16 .NET vs .NET Framework interview questions for .NET roles, each with a model answer, examples and likely follow-ups.

16 questions
Advertisement

16 questions

Q11 Advanced Save

How does the CLR implementation differ between .NET Framework and modern .NET (CoreCLR)?

While both are called 'the CLR', modern .NET uses CoreCLR, a reimplementation optimized for cross-platform execution, modularity, and performance, distinct from .NET Framework's original CLR. CoreCLR includes a modern JIT (RyuJIT) shared conceptually across platforms, supports side-by-side versioning (multiple .NET versions installed simultaneously without conflict, unlike Framework's single machine-wide installation), and has been the target of most of Microsoft's recent runtime performance investment including tiered compilation and dynamic PGO.
// Side-by-side install: multiple CoreCLR versions coexist
dotnet --list-runtimes
// Microsoft.NETCore.App 6.0.25
// Microsoft.NETCore.App 8.0.1
// (Framework CLR: only one version active machine-wide)
Real-world example
A shared build server runs applications targeting both .NET 6 and .NET 8 side by side without conflict, something that would have required careful version management or separate machines under the single machine-wide .NET Framework CLR model.
Likely follow-ups
  • What is tiered compilation and dynamic PGO?
  • Why couldn't Framework support side-by-side versioning the same way?
CLR & Runtime Diagnostics & Performance
Q12 Intermediate Save

Can .NET Framework and modern .NET applications be run side by side on the same machine, and how does that work?

Yes -- .NET Framework is a Windows OS component installed machine-wide with only one active version at a time (though it maintains backward compatibility across 4.x versions), while modern .NET installs side-by-side, allowing multiple independent versions (e.g., 6.0, 8.0, 9.0) to coexist without conflict since each app can reference its exact required runtime version explicitly.
Example

# A machine can have all of these installed simultaneously without conflict: # .NET Framework 4.8 (one version, machine-wide) # .NET 6.0.25 runtime # .NET 8.0.1 runtime # Each app uses exactly the version it targets

Real-world example
A Windows server hosts a legacy Framework 4.8 WCF service alongside a newer .NET 8 microservice simultaneously, with no version conflicts since modern .NET's side-by-side model isolates each application's runtime dependency.
Likely follow-ups
  • How does an app pin its exact required runtime version at startup?
  • What happens if the required version isn't installed?
CLR & Runtime .NET CLI SDK & Project Structure (csproj)
Q13 Advanced Save

What migration strategies exist for gradually moving a large .NET Framework application to modern .NET rather than a big-bang rewrite?

Common incremental strategies include: the 'strangler fig' pattern (build new features in modern .NET services alongside the legacy Framework app, gradually routing traffic away from old code), multi-targeting a shared class library to both net48 and net8.0 during a transition period to catch incompatibilities early, or splitting a monolith into a modern .NET API layer in front of a legacy Framework backend that's migrated piece by piece.
<!-- A shared library multi-targets both during transition -->
<TargetFrameworks>net48;net8.0</TargetFrameworks>

<!-- Conditional code for framework-specific APIs -->
#if NETFRAMEWORK
    // Framework-specific code
#else
    // Modern .NET code
#endif
Real-world example
A large e-commerce platform migrates module by module over 18 months, using the strangler fig pattern to gradually replace Framework-based order processing with a modern .NET 8 service while keeping the legacy checkout flow running unchanged until it's fully replaced.
Likely follow-ups
  • How do you handle shared state or databases during an incremental migration?
  • What's the risk profile of big-bang versus incremental migrations?
CI/CD Publishing & Deployment Microservices & Distributed Architecture Patterns
Q14 Intermediate Save

How does language version support differ between .NET Framework and modern .NET, specifically regarding C# language features?

The C# language version is technically decoupled from the runtime, but practically, .NET Framework projects are typically capped at older C# language versions (commonly C# 7.3 without extra configuration) due to compiler and runtime feature dependencies, while modern .NET projects can freely use the latest C# version (e.g., C# 12/13) with all its newer syntax (records, pattern matching, required members, primary constructors) since Microsoft continuously updates the Roslyn compiler independent of runtime versions -- but some newer syntax also depends on runtime library support only available in modern .NET.
<!-- Framework project: often capped without explicit override -->
<LangVersion>7.3</LangVersion>

<!-- Modern .NET project: latest language features available -->
<LangVersion>latest</LangVersion>
<!-- Enables records, required members, primary constructors, etc. -->
Real-world example
A team stuck on .NET Framework 4.8 can't use C# 9's record types because the required runtime support isn't present, becoming a concrete motivating example for migration beyond just performance concerns.
Likely follow-ups
  • Which specific C# features require runtime support versus being purely compiler-level?
  • How would you force a newer LangVersion on a Framework project?
.NET vs .NET Framework .NET CLI SDK & Project Structure (csproj)
Q15 Beginner Save

Should a brand-new .NET project in 2026 ever target .NET Framework instead of modern .NET?

In the overwhelming majority of cases, no -- new projects should target the latest LTS or STS release of modern .NET to get current performance, cross-platform support, security updates, and active feature development. The rare exception is when a new project must integrate tightly with an existing Framework-only dependency (a specific legacy COM component, certain Windows-only libraries with no modern equivalent) that cannot be replaced, in which case Framework might be a pragmatic short-term necessity.
// New project starter command in 2026:
dotnet new webapi -n MyNewApi
// defaults to the latest LTS or current SDK's default TFM, e.g., net8.0 or net9.0
Real-world example
A startup building a greenfield API explicitly avoids .NET Framework entirely, choosing .NET 8 LTS from day one to ensure Linux container compatibility and multi-year support without needing an eventual migration.
Likely follow-ups
  • What are legitimate remaining reasons to choose Framework for something new?
  • How do you evaluate whether a legacy dependency truly has no modern equivalent?
.NET CLI SDK & Project Structure (csproj) Docker & Containerization
Q16 Beginner Save

What are the practical differences between .NET Framework, .NET Core, and modern (unified) .NET?

.NET Framework was the original, Windows-only implementation, still used to maintain legacy WinForms/WPF/ASP.NET applications but no longer receiving new features; .NET Core was introduced as a ground-up, cross-platform, modular rewrite aimed at cloud and container workloads; starting with .NET 5, Microsoft unified .NET Core and .NET Framework's remaining relevant pieces into a single platform simply called '.NET', releasing a new major version every November and alternating between long-term support (LTS) and standard-term support (STS) releases -- in practice, new projects target modern .NET, while .NET Framework is reserved for maintaining older Windows-only systems that haven't been migrated.
<!-- Modern .NET project file targeting the current LTS -->
<Project Sdk="Microsoft.NET.Sdk.Web">
  <PropertyGroup>
    <TargetFramework>net8.0</TargetFramework>
  </PropertyGroup>
</Project>
Real-world example
A company maintaining a decade-old WPF desktop application keeps it on .NET Framework 4.8 (since a full rewrite isn't currently justified), while every new internal API and microservice the same company builds targets modern .NET, taking advantage of cross-platform deployment and better performance.
Likely follow-ups
  • What specifically stops a .NET Framework-only application from simply being recompiled against modern .NET?
  • How do LTS and STS release cadences affect which version a production team should target?
CLR & Runtime CI/CD Publishing & Deployment

Showing 11–16 of 16