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- Repository
- Aaronontheweb/dotnet-skills1.2k
- 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.jsonmicrosoft-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
<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>
