aaronontheweb/dotnet-skills/project-structure
- community
Checking that the SKILL.md file is still in the repository.
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.
Install
npx vskill@latest install aaronontheweb/dotnet-skills/project-structureSKILL.md
.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) | |
|---|---|---|---|
| Format | Custom text format | Standard XML | |
| Readability | GUIDs, cryptic syntax | Clean, human-readable | |
| Version control | Hard to diff/merge | Easy to diff/merge | |
| Editing | IDE required | Any text editor |
Version Requirements
| Tool | Minimum Version | |
|---|---|---|
| .NET SDK | 9.0.200 | |
| Visual Studio | 17.13 | |
| MSBuild | Visual 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
Migrating from .sln to .slnx
Use the dotnet sln migrate command to convert existing solutions:
Important: Do not keep both .sln and .slnx files in the same repository. This causes issues with automatic solution detection and can lead to sync problems. After migration, delete the old .sln file.
You can also migrate in Visual Studio:
- Open the solution
- Select the Solution in Solution Explorer
- Go to File > Save Solution As...
- Change "Save as type" to Xml Solution File (*.slnx)
Creating a New .slnx Solution
Recommendation
If you're using .NET 9.0.200 or later, migrate your solutions to .slnx. The benefits are significant:
- Dramatically fewer merge conflicts (no random GUIDs changing)
- Human-readable and editable in any text editor
- Consistent with modern
.csprojformat - Better diff/review experience in pull requests
Directory.Build.props
Directory.Build.props provides centralized build configuration that applies to all projects in a directory tree. Place it at the solution root.
Complete Example
Key Patterns
Dynamic Copyright Year
Uses MSBuild property functions to insert current year at build time. No manual updates needed.
Reusable Target Framework Properties
Define target frameworks once, reference everywhere:
SourceLink for NuGet Packages
SourceLink enables step-through debugging of NuGet packages:
Directory.Packages.props - Central Package Management
Central Package Management (CPM) provides a single source of truth for all NuGet package versions.
Setup
Consuming Packages (No Version Needed)
Benefits
- Single source of truth - All versions in one file
- No version drift - All projects use same versions
- Easy updates - Change once, applies everywhere
- Grouped packages - Version variables for related packages (e.g., all Akka packages)
global.json - SDK Version Pinning
Pin the .NET SDK version for consistent builds across all environments.
Roll Forward Policies
| Policy | Behavior | |
|---|---|---|
disable | Exact version required | |
patch | Same major.minor, latest patch | |
feature | Same major, latest minor.patch | |
latestFeature | Same major, latest feature band | |
minor | Same major, latest minor | |
latestMinor | Same major, latest minor | |
major | Latest SDK (not recommended) |
Recommended: latestFeature - Allows patch updates within the same feature band.
Version Management with RELEASE_NOTES.md
Release Notes Format
Parsing Script (getReleaseNotes.ps1)
Version Bump Script (bumpVersion.ps1)
Build Script (build.ps1)
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationWarning, 69 of 100Marginal. 1 run. Evaluated 7 months ago.
Source
- SKILL.md in the repositoryCheckingskills/project-structure/SKILL.md
Popularity
- Repository stars
- 925
- Repository forks
- 86
- 7-day trend score
- 34
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 14 May 2026, 5 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/aaronontheweb/dotnet-skills/project-structure)