Real .NET work spans solutions, multiple projects, and clear boundaries—console apps, class libraries, and test projects. SDK-style layouts are concise compared to older MSBuild XML or Maven verbosity in Java.
Typical layout
MySolution.sln
src/MyApp/MyApp.csproj
src/MyApp/Program.cs
src/MyLib/MyLib.csproj
tests/MyApp.Tests/MyApp.Tests.csproj
Project references
dotnet add reference ../MyLib/MyLib.csproj
Keep domain logic in libraries; executables stay thin entry points. Web hosts add another layer in ASP.NET.
Important interview questions and answers
- Q: Solution vs project?
A: A solution groups related projects; each project produces an assembly (exe or dll). - Q: Assembly vs namespace?
A: Assembly is physical deployment; namespace is logical naming in source.
Self-check
- What file groups multiple csproj projects?
- Where should reusable logic live?
Tip: SDK-style .csproj files are concise—one console app project per executable; split libraries into classlib projects.
Interview prep
- SDK-style csproj?
Concise XML with
Microsoft.NET.Sdk—implicit imports, globbed compile items, and PackageReference for NuGet.- Solution vs project?
A
.slngroups multiple projects; each.csprojis one build unit—libraries reference each other via ProjectReference.