project-structure
.NET solution and project structure conventions. Covers .slnx format, Directory.Build.props, Directory.Packages.props for central package management, global usings, and naming conventions. Load this skill when setting up a new solution, adding projects, configuring build properties, or when the user
By codewithmukesh · 1,189 installs
npx skills add codewithmukesh/dotnet-claude-kit --skill project-structure
Source repository · Upstream listing
Project Structure
Core Principles
1. Central package management — Use Directory.Packages.props to manage NuGet package versions in one place. No version numbers in individual .csproj files.
2. Shared build properties — Use Directory.Build.props for common settings (target framework, nullable, implicit usings). Don't repeat in every project.
3. .slnx for solutions — The new XML based solution format is cleaner and more merge friendly than the legacy .sln format.
4. src/tests separation — Source projects in src/ , test projects in tests/ . Clear boundary.
Patterns
Solution Layout
Directory.Build.props
Directory.Packages.props (Central Package Management)
Project File (.csproj) with Central Package Management
global.json (SDK Pinning)
.slnx Solution Format
Naming Conventions
Element Convention Example
Solution CompanyName.AppName or AppName MyApp.slnx
Project AppName.Layer MyApp.Api , MyApp.Domain
Namespace Matches folder path MyApp.Api.Features.Orders
Feature folder PascalCase, plural Features/Orders/
Test project ProjectName.Tests MyApp.Api.Tests
Anti patterns
Don't Scatter Package Versions
Don't Repeat Build Properties
Don't Mix Source and Test Projects
Decision Guide
Scenario Recommendation
New solution .slnx format
Package version management Directory.Packages.props (central)
Shared build settings Directory.Build.props
SDK version pinning global.json
Common using directives Global usings in Directory.Build.props
Small API (1 2 devs) Single project ( MyApp.Api )
Medium API (3 5 devs) 2 3 projects ( Api , Domain , Infrastructure )
Large / modular app Module per project with shared Contracts