dotnet-project-structure

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

Updated Dec 4, 2022
One-click install
npx skills add https://github.com/devingoble/CloudOStat --skill dotnet-project-structure-devingoble
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dotnet-project-structure
Source: https://github.com/devingoble/CloudOStat/tree/main/.github/skills/project-structure
Command: npx skills add https://github.com/devingoble/CloudOStat --skill dotnet-project-structure-devingoble

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This skill provides a robust and modern foundation for .NET projects, streamlining setup, build configuration, and version management to ensure consistency and reduce maintenance overhead.

Core Features & Use Cases

  • Modern Solution Format: Utilizes the .slnx format for improved readability and version control.
  • Centralized Build & Package Management: Employs Directory.Build.props and Directory.Packages.props for unified project settings and NuGet package versions.
  • Automated Versioning: Integrates RELEASE_NOTES.md with build scripts for seamless version bumping and package release notes.
  • SDK Pinning: Uses global.json to enforce consistent .NET SDK versions across development and CI environments.
  • SourceLink Integration: Configures SourceLink for enhanced debugging capabilities with NuGet packages.

Quick Start

Set up a new .NET solution with modern best practices by initializing the project structure.

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 project structure with centralized package management?

To set up a .NET project structure with centralized package management, configure Directory.Packages.props to unify NuGet package versions across the solution. This approach ensures consistent dependency versions and reduces manual maintenance overhead across all projects.

What is the .slnx solution format and when should I use it for .NET projects?

The .slnx solution format is a modern .NET solution file offering improved readability and version control integration. Use it when establishing a new .NET project structure to leverage cleaner syntax and better source control diff tracking.

How do I pin the .NET SDK version across development and CI environments?

Pin the .NET SDK version across development and CI environments by adding a global.json file to your project root. This enforces consistent SDK versions, preventing build failures caused by mismatched local and CI environment configurations.

Does central package management work with SourceLink for NuGet debugging?

Yes, central package management works alongside SourceLink. Configure Directory.Packages.props for package versions and integrate SourceLink separately to enable enhanced debugging capabilities for NuGet packages by linking assemblies to source control.

How do I automate version management and release notes for .NET NuGet packages?

Automate version management for .NET NuGet packages by maintaining a RELEASE_NOTES.md file and integrating it with build scripts. This setup enables seamless version bumping and automatically generates package release notes during your build process.

What is the best way to centralize build properties in a .NET solution?

The best way to centralize build properties in a .NET solution is using a Directory.Build.props file. This file defines unified project settings at the directory level, ensuring all projects inherit consistent build configurations automatically.