Skills

Dotnet Project Structure

Modern .NET project structure including .slnx solution format, Directory.Build.props...

Install

npx skills add Aaronontheweb/dotnet-skills --skill dotnet-project-structure -g -a claude-code -y
Category
Engineering
Updated
7d ago
License
MIT
Context cost
Mediumabout 3,000 tokens
Runs scripts
No, instructions only

What it does

Modern .NET project structure including .slnx solution format, Directory.Build.props, central package management, SourceLink, version management with RELEASE_NOTES.md, and SDK pinning with global.json.

.NET Project Structure and Build Configuration

When to Use This Skill

Use this skill when:

  • Setting up a new .NET solution with modern best practices
  • Configuring centralized build properties across multiple projects
  • Implementing central package version management
  • Setting up SourceLink for debugging and NuGet packages
  • Automating version management with release notes
  • Pinning SDK versions for consistent builds

Related Skills

  • dotnet-local-tools - Managing local .NET tools with dotnet-tools.json
  • microsoft-extensions-configuration - Configuration validation patterns

Solution File Format (.slnx)

The .slnx format is the modern XML-based solution file format introduced in .NET 9. It replaces the traditional .sln format.

Benefits Over Traditional .sln

Aspect.sln (Legacy).slnx (Modern)
FormatCustom text formatStandard XML
ReadabilityGUIDs, cryptic syntaxClean, human-readable
Version controlHard to diff/mergeEasy to diff/merge
EditingIDE requiredAny text editor

Version Requirements

ToolMinimum Version
.NET SDK9.0.200
Visual Studio17.13
MSBuildVisual Studio Build Tools 17.13

Note: Starting with .NET 10, dotnet new sln creates .slnx files by default. In .NET 9, you must explicitly migrate or specify the format.

Example .slnx File

<Solution>
  <Folder Name="/build/">
    <File Path="Directory.Build.props" />
    <File Path="Directory.Packages.props" />
    <File Path="global.json" />
    <File Path="NuGet.Config" />
    <File Path="README.md" />
  </Folder>
  <Folder Name="/src/">
    <Project Path="src/MyApp/MyApp.csproj" />
    <Project Path="src/MyApp.Core/MyApp.Core.csproj" />
  </Folder>
  <Folder Name="/tests/">
    <Project Path="tests/MyApp.Tests/MyApp.Tests.csproj" />
  </Folder>
</Solution>

Migrating from .sln to .slnx

Read the whole SKILL.md on GitHub

More in Engineering