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.
The dotnet command: new, build, run, test, publish, restore, clean, pack, tool, ef and format.
The dotnet driver and its everyday commands: creating projects and solutions from templates, building, running and cleaning, and how the CLI relates to the SDK, MSBuild and the IDEs.
The CLI pipeline end to end: restore producing project.assets.json, build producing bin and obj outputs, test running against those outputs, publish producing a deployable folder, and how --no-restore and --no-build keep CI fast and consistent.
Running tests from the CLI: how dotnet test discovers and runs tests, VSTest filters, loggers and TRX results, Coverlet and Microsoft code coverage, hang and crash diagnostics, parallelism, and Microsoft.Testing.Platform in .NET 10.
Choosing a deployment shape with dotnet publish for .NET 10: runtime identifiers, framework-dependent vs self-contained, single-file, trimming, ReadyToRun, Native AOT and SDK-built container images, with their size, start-up and compatibility trade-offs.
Troubleshooting restore failures: how NuGet finds sources and credentials through nuget.config, credential providers and CI service connections, package source mapping, lock files, caches, NuGet Audit, and protecting against dependency confusion.
Packaging a reusable library with dotnet pack: required and recommended metadata, SemVer versioning from CI, README and licence, symbols and Source Link, deterministic builds, package validation, signing and pushing to a feed.
Covers dotnet tool: global vs local vs tool-path installs, the .config/dotnet-tools.json manifest, restore in CI, one-shot execution in .NET 10, and supply-chain safety.
Covers dotnet ef migrations in CI/CD: --project/--startup-project, design-time factories, idempotent SQL scripts, migration bundles, pending model change checks, and why startup migration is risky.
A code review of a CI pipeline: redundant restores, missing --no-restore/--no-build, Release configuration, locked restore, dotnet format --verify-no-changes, test results and coverage, and publish options.