directory-build-organization

Standardize MSBuild configuration across multi-project repos with Directory.Build.props and targets.

2|Updated Mar 17, 2026
One-click install
npx skills add https://github.com/sayedihashimi/copilot-skill-eval --skill directory-build-organization-sayedihashimi
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: directory-build-organization
Source: https://github.com/sayedihashimi/copilot-skill-eval/tree/main/examples/aspnet-razor-pages/plugins/dotnet-skills/dotnet-msbuild/skills/directory-build-organization
Command: npx skills add https://github.com/sayedihashimi/copilot-skill-eval --skill directory-build-organization-sayedihashimi

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Centralizes and organizes MSBuild configurations across multi-project repos by detailing how to structure and leverage Directory.Build.props, Directory.Build.targets, and central package management.

Core Features & Use Cases

  • Understanding when to use Directory.Build.props vs Directory.Build.targets to control import timing and capabilities.
  • Centralized defaults and metadata with Directory.Build.props and Directory.Packages.props to reduce boilerplate across projects.
  • Multi-level build hierarchies using GetPathOfFileAbove to chain repo-wide and inner-directory settings for src, test, and packages.

Quick Start

Create a root Directory.Build.props and Directory.Build.targets, then structure your repo with inner Directory.Build.props for src and test as shown, and adopt Central Package Management with Directory.Packages.props.

Frequently Asked Questions about directory-build-organization

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

FAQPage Schema
How do I centralize MSBuild configuration across multiple .NET projects?▼

Use Directory.Build.props for static properties and Directory.Build.targets for build targets to centralize MSBuild configuration, controlling import timing and available capabilities across .NET SDK-style projects.

When should I use Directory.Build.props vs Directory.Build.targets?▼

Use Directory.Build.props to set centralized default properties early in the build, and Directory.Build.targets to define targets and tasks later, ensuring proper import timing and capabilities for .NET builds.

How do I chain multi-level MSBuild builds in a large repository?▼

Chain multi-level MSBuild builds by using the GetPathOfFileAbove function to import parent Directory.Build.props, allowing you to layer repo-wide defaults with inner-directory settings for src and test.

Does central package management work with Directory.Build.props?▼

Yes, central package management uses Directory.Packages.props alongside Directory.Build.props to centralize package versions and reduce boilerplate across .NET SDK-style projects in a monorepo.

What is the best way to manage shared build settings in a .NET monorepo?▼

The best way to manage shared build settings in a .NET monorepo is combining Directory.Build.props, Directory.Build.targets, and central package management to enforce consistent build behavior and reduce boilerplate.

Can I use Directory.Build.props with non-SDK style .NET projects?▼

Directory.Build.props and Directory.Build.targets are specifically applicable to .NET SDK-style projects, providing centralized defaults and multi-level inheritance for consistent build behavior in monorepos.