📁 Sangam Dhakal - Portfolio v2.0 - Netscape Navigator 4.0
_
□
×

πŸ“š .NET Interview Questions

377 questions for senior .NET engineer interviews, each with a 30-second answer, the full answer, a deep dive, the follow-ups interviewers ask next, and real-world production problems.

Project System

SDK-style .csproj, .sln and .slnx, target frameworks, runtime identifiers, global.json, Directory.Build files, package and project references, and Central Package Management.

  1. How does the .NET SDK decide which SDK version to use, and how does global.json change that?

    SDK resolution: how the dotnet host picks an SDK, what global.json's version, rollForward and allowPrerelease settings do, why pinning matters for IDEs and CI, and how to diagnose 'compatible SDK not found' failures.

    Mid-Level Debugging Project System Β· πŸ”— 3 follow-ups Β· πŸ›  1 real-world
  2. What is an SDK-style .csproj, and how does it differ from an old-style project file?

    The modern project file: the Sdk attribute, implicit imports, default globbing of source files, PackageReference, and why SDK-style projects are short, mergeable and cross-platform.

    Beginner Theory Project System Β· πŸ”— 3 follow-ups
  3. What is the difference between a .sln and a .slnx solution file, and when would you use a solution filter?

    Solutions versus projects, the classic .sln format, the XML .slnx format that is the default for new solutions in the .NET 10 SDK, migrating with dotnet sln migrate, and .slnf solution filters for large repos.

    Junior Theory Project System Β· πŸ”— 3 follow-ups
  4. What are target framework monikers like net8.0, net9.0 and net10.0, how do you choose one, and when should you multi-target?

    TFMs and the .NET support lifecycle: what net8.0/net9.0/net10.0 and OS-specific TFMs mean, LTS versus STS, choosing targets for apps versus libraries, multi-targeting with TargetFrameworks and conditional code, and .NET 11 awareness.

    Intermediate Theory Project System Β· πŸ”— 3 follow-ups
  5. What are runtime identifiers (RIDs), and when do you need to set one in a .NET project?

    Runtime identifiers: portable RIDs like linux-x64 and win-arm64, when a RID is needed (self-contained, single-file, AOT, native assets), RuntimeIdentifier versus RuntimeIdentifiers, the .NET 8 move to portable RIDs, and RID-specific NuGet assets.

    Intermediate Theory Project System Β· πŸ”— 2 follow-ups
  6. How do Directory.Build.props and Directory.Build.targets work, and what belongs in each?

    Shared build configuration: how MSBuild finds and imports Directory.Build.props early and Directory.Build.targets late, nearest-file-wins and chaining with GetPathOfFileAbove, what to put in each, conditions per project type, and debugging with preprocess and binary logs.

    Mid-Level Theory Project System Β· πŸ”— 3 follow-ups Β· πŸ›  1 real-world
  7. What is the difference between a PackageReference and a ProjectReference, and how do PrivateAssets and transitive dependencies affect consumers?

    Referencing code in .NET: NuGet PackageReference versus ProjectReference, version ranges and floating versions, transitive flow, PrivateAssets/IncludeAssets/ExcludeAssets, ReferenceOutputAssembly, and when to use each.

    Intermediate Theory Project System Β· πŸ”— 3 follow-ups
  8. Your solution has 80 projects with drifting NuGet versions. How would you introduce Central Package Management with Directory.Packages.props, and what are the pitfalls?

    Central Package Management in practice: Directory.Packages.props, ManagePackageVersionsCentrally, PackageVersion items, VersionOverride, GlobalPackageReference, transitive pinning, NU1008 and NU1507, migration steps and governance.

    Senior RealWorldScenario Project System Β· πŸ”— 3 follow-ups Β· πŸ›  1 real-world
  9. You are asked to set build governance for a monorepo of 250 .NET projects owned by twelve teams. How would you design the repo-wide build configuration, and how do you keep it healthy?

    Staff-level design of repo-wide .NET build governance: global.json, layered Directory.Build files, Central Package Management, nuget.config and lock files, analyser and warning policy, artefact layout, CODEOWNERS, shared pipelines, exception processes, build performance and metrics.

    Staff / Architect Architecture Project System Β· πŸ”— 3 follow-ups Β· πŸ›  1 real-world

🌐 Sangam's Webring

βͺ Previous 🏠 Main Next ⏩
πŸ’¬ Chat with me