project-structure

Establish .NET solution and project structure conventions with .slnx and central package management.

1|Updated Apr 28, 2026
One-click install
npx skills add https://github.com/Trossitec/dotnet-claude-kit --skill project-structure-trossitec
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: project-structure
Source: https://github.com/Trossitec/dotnet-claude-kit/tree/main/skills/project-structure
Command: npx skills add https://github.com/Trossitec/dotnet-claude-kit --skill project-structure-trossitec

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill prevents messy, inconsistent .NET repositories by providing clear conventions for solution/project layout, shared build settings, and modern central package management.

Core Features & Use Cases

  • Central package management: Uses Directory.Packages.props so NuGet versions live in one place, avoiding version drift across projects.
  • Shared build properties: Uses Directory.Build.props to standardize TargetFramework, language level, nullability, and common compiler settings.
  • Modern solution layout: Recommends .slnx for cleaner, merge-friendly solutions and a consistent src/ and tests/ separation.
  • Naming and organization guidance: Provides conventions for solution names, project names, namespaces aligned with folders, feature folder structure, and test project suffixes.
  • Use cases: When creating a new .NET solution, adding a new project layer (Api/Domain/Infrastructure), introducing central package management, or reorganizing an existing repo for scalability.

Quick Start

Use the project-structure skill to generate a recommended folder and file layout for your new .NET solution, including .slnx, Directory.Build.props, Directory.Packages.props, global.json, and the src/ and tests/ structure.

Frequently Asked Questions about project-structure

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up central package management in a .NET solution?

Central package management in .NET uses Directory.Packages.props to consolidate NuGet versions into a single file, eliminating version drift. It standardizes dependencies across all projects and simplifies package updates.

What is the best way to organize a .NET solution with src and tests folders?

The best way to organize a .NET solution is separating src/ and tests/ folders, using .slnx for merge-friendly layouts, and aligning namespaces with feature folders. This structure ensures scalability and consistent naming conventions.

How do I standardize build settings across multiple .NET projects?

Standardize build settings across .NET projects using Directory.Build.props to define TargetFramework, language level, nullability, and compiler configurations. This ensures all projects inherit shared MSBuild properties automatically.

Does .slnx work with MSBuild for cleaner solution layouts?

.slnx works with MSBuild to provide a cleaner, merge-friendly solution layout compared to traditional .sln files. It reduces merge conflicts and supports consistent src/ and tests/ separation in .NET repositories.

When do I need Directory.Build.props in my .NET repository?

You need Directory.Build.props when creating a new .NET solution, adding project layers like Api/Domain/Infrastructure, or reorganizing an existing repo. It standardizes MSBuild properties and enforces consistent compiler settings.

Why does central package management prevent NuGet version drift?

Central package management prevents NuGet version drift by consolidating all package versions into Directory.Packages.props. This avoids duplicate versions across projects and ensures consistent dependency resolution in .NET solutions.