project-structure

Standardize .NET solution and project structure with central MSBuild properties.

224|87|Updated Dec 15, 2018
One-click install
npx skills add https://github.com/Resgrid/Core --skill project-structure-resgrid
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: project-structure
Source: https://github.com/Resgrid/Core/tree/main/.opencode/skills/project-structure
Command: npx skills add https://github.com/Resgrid/Core --skill project-structure-resgrid

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It solves the recurring confusion and drift that happens when .NET teams create solutions inconsistently, scatter NuGet versions across many .csproj files, and duplicate build settings instead of centralizing them.

Core Features & Use Cases

  • Central package management: Manage NuGet versions in a single Directory.Packages.props file to prevent version drift across projects.
  • Shared build properties: Centralize common MSBuild settings in Directory.Build.props so projects inherit consistent frameworks and compiler behavior.
  • Modern solution layout guidance: Prefer the .slnx format and keep source and tests separated (src/ vs tests/) to reduce merge conflicts and improve clarity.
  • Naming and folder conventions: Apply predictable patterns for solutions, projects, namespaces, feature directories, and test project names.

Quick Start

Load this skill when creating a new .NET solution and ask an AI to propose a folder and project layout that uses Directory.Packages.props, Directory.Build.props, a .slnx solution, and a src//tests/ separation.

Frequently Asked Questions about project-structure

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

FAQPage Schema
How do I centralize NuGet package versions across multiple .NET projects?

Central package management lets you manage NuGet versions in a single Directory.Packages.props file to prevent version drift across projects. This replaces scattered package references in individual .csproj files with a centralized version control mechanism.

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

The .slnx format is a modern solution layout that reduces merge conflicts and improves clarity. You should use .slnx when setting up new .NET solutions to enforce consistent directory structure with src/ and tests/ separation.

How do I configure shared MSBuild properties for all projects in a .NET solution?

Centralize common MSBuild settings in a Directory.Build.props file so projects inherit consistent target frameworks and compiler behavior. This shared build properties approach eliminates duplicated configuration across repositories.

What's the best way to structure a .NET solution with source and test projects?

The best approach applies a src/tests separation pattern with clear project naming conventions. This folder structure reduces merge conflicts while enforcing predictable naming for solutions, projects, namespaces, and feature directories.

Can I use global usings with central package management in .NET?

Yes, you can configure global usings alongside central package management. The standardized .NET solution layout supports both Directory.Packages.props for NuGet version control and global usings for shared namespace imports.

Why does my .NET build fail due to inconsistent project structure and scattered configuration?

Inconsistent builds happen when .NET teams create solutions without standardized layouts, scatter NuGet versions across .csproj files, and duplicate build settings. Centralizing configuration in Directory.Build.props and Directory.Packages.props prevents this drift.