dotnet-project-structure

Configure .NET solutions with .slnx, Directory.Build.props, and global.json.

Updated Apr 23, 2026
One-click install
npx skills add https://github.com/MudraMartin/dotlight-skillset --skill dotnet-project-structure-mudramartin
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dotnet-project-structure
Source: https://github.com/MudraMartin/dotlight-skillset/tree/main/dotnet/project-structure
Command: npx skills add https://github.com/MudraMartin/dotlight-skillset --skill dotnet-project-structure-mudramartin

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires dotnet, and includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

This Skill streamlines the setup and configuration of .NET solutions, improving build consistency and maintainability.

Core Features & Use Cases

  • Modern .slnx Format: Converts traditional .sln files to the modern .slnx format for better readability and version control.
  • Centralized Build Config: Utilizes Directory.Build.props for centralized configuration of build properties across projects.
  • Package Management: Manages NuGet package versions centrally to ensure consistency and ease of updates.
  • SDK Version Pinning: Pins .NET SDK versions with global.json for reliable builds across environments.
  • SourceLink Integration: Enables debugging of NuGet packages using SourceLink.
  • Use Case: A .NET developer looking to set up a new solution with best practices for directory structure, build configuration, and version management.

Quick Start

Run the 'dotnet-project-structure' skill to initialize a new .NET solution with best practices.

Frequently Asked Questions about dotnet-project-structure

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

FAQPage Schema
How do I set up a .NET solution with centralized build configuration?

To set up a .NET solution with centralized build configuration, use Directory.Build.props files to manage build properties across projects. This approach ensures consistency and simplifies updates by centralizing configuration rather than maintaining settings in each project file individually.

What is the .slnx format and how does it improve .NET solution setup?

The .slnx format is a modern replacement for traditional .sln files that improves .NET solution setup through better readability and version control. Converting to .slnx streamlines solution management by using a cleaner XML structure that is easier to merge and maintain.

How do I manage NuGet package versions centrally in a .NET solution?

You can manage NuGet package versions centrally in a .NET solution by using a centralized package management configuration. This ensures version consistency across all projects and simplifies the update process by defining package versions in one shared location rather than scattering them across individual project files.

Can I pin the .NET SDK version for reliable builds across environments?

Yes, you can pin the .NET SDK version for reliable builds across environments by using a global.json file. This ensures that every developer and build server uses the exact same SDK version, preventing build failures caused by version mismatches. This skill targets .NET 9.0.200 and later.

Does SourceLink work with NuGet packages for debugging?

SourceLink works with NuGet packages to enable direct debugging into the original source code. By integrating SourceLink into your build configuration, the debugger can automatically fetch source files from the source control repository, allowing you to step through package code seamlessly.

What is the best way to migrate an existing .sln file to .slnx?

The best way to migrate an existing .sln file to .slnx is to use tooling that converts the traditional solution format to the modern XML-based structure. This migration improves readability and version control integration while preserving your existing project references and build configurations.