[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M699DT94AMC80T8GCR8DYQKC":3,"skill-same:01M699DT94AMC80T8GCR8DYQKC":83},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":41,"linkOnly":42,"markdownContent":43,"markdownBody":44,"frontMatter":45,"refName":46,"commitSha":47,"skillDirectory":48,"forksCount":49,"repositoryHtmlUrl":50,"repositoryHomepageUrl":6,"ownerHtmlUrl":51,"ownerBlogUrl":52,"ownerDescription":53,"updatedAt":54,"install":55,"resources":68},"01M699DT94AMC80T8GCR8DYQKC","directory-build-organization",null,"USE ONLY for (1) two or more projects with repeated MSBuild policy, targets, or package versions, or (2) an existing Directory.Build.props\u002Ftargets\u002Frsp hierarchy with an import, placement, or layering defect. A one-project repo without an existing Directory.Build file is outside scope; do not load this skill. Covers centralizing shared policy and targets, Directory.Packages.props across projects, parent hierarchy\u002Fimport structure, props-versus-targets placement, and folder\u002Fproject exceptions. An existing hierarchy defect remains in scope when only one project is affected. For property value or condition semantics use property-patterns. Exclude legacy-to-SDK migration and non-MSBuild systems.","microsoft\u002Ftestfx","microsoft","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F6154722?v=4","01M698VYDXZ6JW5WH3CRV650R8","Microsoft","01M699C71CJ91B5WZ3AXG3GG2M",1059,"MIT","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Ftestfx\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fdirectory-build-organization\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40],"directory build organization","build","organization","directory","structure","when","defect","hierarchy","affected","condition","import","scope","project","shared","across","patterns","do","only","projects","packages","policy","sdk","2026-11-10 10:12:30",false,"---\nname: directory-build-organization\ndescription: \"USE ONLY for (1) two or more projects with repeated MSBuild policy, targets, or package versions, or (2) an existing Directory.Build.props\u002Ftargets\u002Frsp hierarchy with an import, placement, or layering defect. A one-project repo without an existing Directory.Build file is outside scope; do not load this skill. Covers centralizing shared policy and targets, Directory.Packages.props across projects, parent hierarchy\u002Fimport structure, props-versus-targets placement, and folder\u002Fproject exceptions. An existing hierarchy defect remains in scope when only one project is affected. For property value or condition semantics use property-patterns. Exclude legacy-to-SDK migration and non-MSBuild systems.\"\nlicense: MIT\n---\n\n# Organizing Build Infrastructure with Directory.Build Files\n\n## Intent control\n\n- For \"should we\", \"how should we organize\", \"recommend\", \"advise\", or review\n  requests, inspect the actual project files and return a proposed layout only.\n  Do not create or edit files unless the user explicitly asks to apply, move,\n  centralize, or clean up the configuration.\n- Before summarizing, verify which project retains each project-specific\n  property, item, or target. Name the actual file; do not infer it from sibling\n  names.\n- Recommend a verification command only after discovering a real `.sln`,\n  `.slnx`, `.proj`, or project file at that path. If no repo-root entry point\n  exists, give commands for the discovered projects or state that the entry\n  point was not found.\n- Every advice response must explain that `Microsoft.Common.props` searches\n  upward from each project and automatically imports the nearest\n  `Directory.Build.props` early; project values can then override shared\n  defaults. Explain the equivalent late `Microsoft.Common.targets` import when\n  recommending `Directory.Build.targets`.\n\n## Directory.Build.props vs Directory.Build.targets\n\nUnderstanding which file to use is critical. They differ in **when** they are imported during evaluation:\n\n**Evaluation order:**\n\n```\nMicrosoft.Common.props imports Directory.Build.props early\n→ project body and package\u002Fproject imports evaluate\n→ Microsoft.Common.targets imports Directory.Build.targets late\n```\n\n| Use `.props` for | Use `.targets` for |\n|---|---|\n| Setting property defaults | Custom build targets |\n| Common item definitions | Late-bound property overrides |\n| Properties projects can override | Post-build steps |\n| Assembly\u002Fpackage metadata | Conditional logic on final values |\n| Analyzer PackageReferences | Targets that depend on SDK-defined properties |\n\n**Rule of thumb:** Properties and items go in `.props`. Custom targets and late-bound logic go in `.targets`.\n\nBecause `.props` is imported before the project file, the project can override any value set there. Because `.targets` is imported after everything, it gets the final say—but projects cannot override `.targets` values.\n\n### ⚠️ Critical: TargetFramework Availability in .props vs .targets\n\n**Property conditions on `$(TargetFramework)` in `.props` files silently fail for single-targeting projects** — the property is empty during `.props` evaluation. Move TFM-conditional properties to `.targets` instead. ItemGroup and Target conditions are not affected.\n\nSee [targetframework-props-pitfall.md](references\u002Ftargetframework-props-pitfall.md) for the full explanation.\n\n## Directory.Build.props\n\nGood candidates: language settings, assembly\u002Fpackage metadata, build warnings, code analysis, common analyzers.\n\n```xml\n\u003CProject>\n  \u003CPropertyGroup>\n    \u003CNullable>enable\u003C\u002FNullable>\n    \u003CImplicitUsings>enable\u003C\u002FImplicitUsings>\n    \u003CTreatWarningsAsErrors>true\u003C\u002FTreatWarningsAsErrors>\n    \u003CEnforceCodeStyleInBuild>true\u003C\u002FEnforceCodeStyleInBuild>\n    \u003CCompany>Contoso\u003C\u002FCompany>\n    \u003CAuthors>Contoso Engineering\u003C\u002FAuthors>\n  \u003C\u002FPropertyGroup>\n\u003C\u002FProject>\n```\n\n**Do NOT put here:** project-specific TFMs, project-specific PackageReferences, targets\u002Fbuild logic, or properties depending on SDK-defined values (not available during `.props` evaluation).\n\n## Directory.Build.targets\n\nGood candidates: custom build targets, late-bound property overrides (values depending on SDK properties), post-build validation.\n\n```xml\n\u003CProject>\n  \u003CTarget Name=\"ValidateProjectSettings\" BeforeTargets=\"Build\">\n    \u003CError Text=\"All libraries must target netstandard2.0 or higher\"\n           Condition=\"'$(OutputType)' == 'Library' AND '$(TargetFramework)' == 'net472'\" \u002F>\n  \u003C\u002FTarget>\n\n  \u003CPropertyGroup>\n    \u003C!-- DocumentationFile depends on OutputPath, which is set by the SDK -->\n    \u003CDocumentationFile Condition=\"'$(IsPackable)' == 'true'\">$(OutputPath)$(AssemblyName).xml\u003C\u002FDocumentationFile>\n  \u003C\u002FPropertyGroup>\n\u003C\u002FProject>\n```\n\n## Directory.Packages.props (Central Package Management)\n\nCentral Package Management (CPM) provides a single source of truth for all NuGet package versions. See [https:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Fnuget\u002Fconsume-packages\u002Fcentral-package-management](https:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Fnuget\u002Fconsume-packages\u002Fcentral-package-management) for details.\n\n**Enable CPM in `Directory.Packages.props` at the repo root:**\n\n```xml\n\u003CProject>\n  \u003CPropertyGroup>\n    \u003CManagePackageVersionsCentrally>true\u003C\u002FManagePackageVersionsCentrally>\n  \u003C\u002FPropertyGroup>\n\n  \u003CItemGroup>\n    \u003CPackageVersion Include=\"Microsoft.Extensions.Logging\" Version=\"8.0.0\" \u002F>\n    \u003CPackageVersion Include=\"Newtonsoft.Json\" Version=\"13.0.3\" \u002F>\n    \u003CPackageVersion Include=\"xunit\" Version=\"2.9.0\" \u002F>\n    \u003CPackageVersion Include=\"xunit.runner.visualstudio\" Version=\"2.8.2\" \u002F>\n  \u003C\u002FItemGroup>\n\n  \u003CItemGroup>\n    \u003C!-- GlobalPackageReference applies to ALL projects — great for analyzers -->\n    \u003CGlobalPackageReference Include=\"StyleCop.Analyzers\" Version=\"1.2.0-beta.556\" \u002F>\n    \u003CGlobalPackageReference Include=\"Microsoft.CodeAnalysis.NetAnalyzers\" Version=\"8.0.0\" \u002F>\n  \u003C\u002FItemGroup>\n\u003C\u002FProject>\n```\n\n## Directory.Build.rsp\n\nContains default MSBuild CLI arguments applied to all builds under the directory tree.\n\n**Example `Directory.Build.rsp`:**\n\n```\n\u002Fmaxcpucount\n\u002FnodeReuse:false\n\u002FconsoleLoggerParameters:Summary;ForceNoAlign\n\u002FwarnAsMessage:MSB3277\n```\n\n- Works with both `msbuild` and `dotnet` CLI in modern .NET versions\n- Great for enforcing consistent CI and local build flags\n- Each argument goes on its own line\n\n## Multi-level Directory.Build Files\n\nMSBuild only auto-imports the **first** `Directory.Build.props` (or `.targets`) it finds walking up from the project directory. To chain multiple levels, explicitly import the parent at the **top** of the inner file. See [multi-level-examples](references\u002Fmulti-level-examples.md) for full file examples.\n\n```xml\n\u003CProject>\n  \u003CImport Project=\"$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)..\u002F'))\"\n         Condition=\"Exists('$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)..\u002F'))')\" \u002F>\n\n  \u003C!-- Inner-level overrides go here -->\n\u003C\u002FProject>\n```\n\n**Example layout:**\n\n```\nrepo\u002F\n  Directory.Build.props          ← repo-wide (lang version, company info, analyzers)\n  Directory.Build.targets        ← repo-wide targets\n  Directory.Packages.props       ← central package versions\n  src\u002F\n    Directory.Build.props        ← src-specific (imports repo-level, sets IsPackable=true)\n  test\u002F\n    Directory.Build.props        ← test-specific (imports repo-level, sets IsPackable=false, adds test packages)\n```\n\n## Artifact Output Layout (.NET 8+)\n\nSet `\u003CArtifactsPath>$(MSBuildThisFileDirectory)artifacts\u003C\u002FArtifactsPath>` in `Directory.Build.props` to automatically produce project-name-separated `bin\u002F`, `obj\u002F`, and `publish\u002F` directories under a single `artifacts\u002F` folder, avoiding bin\u002Fobj clashes by default. See [common-patterns](references\u002Fcommon-patterns.md) for the directory layout and additional patterns (conditional settings by project type, post-pack validation).\n\n## Workflow: Organizing Build Infrastructure\n\n1. **Audit all `.csproj` files** — Catalog every `\u003CPropertyGroup>`, `\u003CItemGroup>`, and custom `\u003CTarget>` across the solution. Note which settings repeat and which are project-specific.\n2. **Create root `Directory.Build.props`** — Move shared property defaults (LangVersion, Nullable, TreatWarningsAsErrors, metadata) here. These are imported before the project file so projects can override them.\n3. **Create root `Directory.Build.targets`** — Move custom build targets, post-build validation, and any properties that depend on SDK-defined values (e.g., `OutputPath`, `TargetFramework` for single-targeting projects) here. These are imported after the SDK so all properties are available.\n4. **Create `Directory.Packages.props`** — Enable Central Package Management (`ManagePackageVersionsCentrally`), list all `PackageVersion` entries, and remove `Version=` from `PackageReference` items in `.csproj` files.\n5. **Set up multi-level hierarchy** — Create inner `Directory.Build.props` files for `src\u002F` and `test\u002F` folders with distinct settings. Use `GetPathOfFileAbove` to chain to the parent.\n6. **Simplify `.csproj` files** — Remove all centralized properties, version attributes, and duplicated targets. Each project should only contain what is unique to it.\n7. **Validate** — Run restore\u002Fbuild against the discovered `.sln`, `.slnx`,\n   `.proj`, or project path, for example\n   `dotnet restore \u003Centrypoint> && dotnet build \u003Centrypoint>`. If no root\n   entrypoint exists, validate each discovered project explicitly instead of\n   claiming a repo-root build. Use\n   `dotnet msbuild \u003Cproject> -pp:output.xml` to inspect the final merged view.\n\n## Troubleshooting\n\n| Problem | Cause | Fix |\n|---|---|---|\n| `Directory.Build.props` isn't picked up | File name casing wrong (exact match required on Linux\u002FmacOS) | Verify exact casing: `Directory.Build.props` (capital D, B) |\n| Properties from `.props` are ignored by projects | Project sets the same property after the import | Move the property to `Directory.Build.targets` to set it after the project |\n| Multi-level import doesn't work | Missing `GetPathOfFileAbove` import in inner file | Add the `\u003CImport>` element at the top of the inner file (see Multi-level section) |\n| Properties using SDK values are empty in `.props` | SDK properties aren't defined yet during `.props` evaluation | Move to `.targets` which is imported after the SDK |\n| `Directory.Packages.props` not found | File not at repo root or not named exactly | Must be named `Directory.Packages.props` and at or above the project directory |\n| Property condition on `$(TargetFramework)` doesn't match in `.props` | `TargetFramework` isn't set yet for single-targeting projects during `.props` evaluation | Move property to `.targets`, or use ItemGroup\u002FTarget conditions instead (which evaluate late) |\n\n**Diagnosis:** Use the preprocessed project output to see all imports and final property values:\n\n```bash\ndotnet msbuild -pp:output.xml MyProject.csproj\n```\n\nThis expands all imports inline so you can see exactly where each property is set and what the final evaluated value is.\n","# Organizing Build Infrastructure with Directory.Build Files\n\n## Intent control\n\n- For \"should we\", \"how should we organize\", \"recommend\", \"advise\", or review\n  requests, inspect the actual project files and return a proposed layout only.\n  Do not create or edit files unless the user explicitly asks to apply, move,\n  centralize, or clean up the configuration.\n- Before summarizing, verify which project retains each project-specific\n  property, item, or target. Name the actual file; do not infer it from sibling\n  names.\n- Recommend a verification command only after discovering a real `.sln`,\n  `.slnx`, `.proj`, or project file at that path. If no repo-root entry point\n  exists, give commands for the discovered projects or state that the entry\n  point was not found.\n- Every advice response must explain that `Microsoft.Common.props` searches\n  upward from each project and automatically imports the nearest\n  `Directory.Build.props` early; project values can then override shared\n  defaults. Explain the equivalent late `Microsoft.Common.targets` import when\n  recommending `Directory.Build.targets`.\n\n## Directory.Build.props vs Directory.Build.targets\n\nUnderstanding which file to use is critical. They differ in **when** they are imported during evaluation:\n\n**Evaluation order:**\n\n```\nMicrosoft.Common.props imports Directory.Build.props early\n→ project body and package\u002Fproject imports evaluate\n→ Microsoft.Common.targets imports Directory.Build.targets late\n```\n\n| Use `.props` for | Use `.targets` for |\n|---|---|\n| Setting property defaults | Custom build targets |\n| Common item definitions | Late-bound property overrides |\n| Properties projects can override | Post-build steps |\n| Assembly\u002Fpackage metadata | Conditional logic on final values |\n| Analyzer PackageReferences | Targets that depend on SDK-defined properties |\n\n**Rule of thumb:** Properties and items go in `.props`. Custom targets and late-bound logic go in `.targets`.\n\nBecause `.props` is imported before the project file, the project can override any value set there. Because `.targets` is imported after everything, it gets the final say—but projects cannot override `.targets` values.\n\n### ⚠️ Critical: TargetFramework Availability in .props vs .targets\n\n**Property conditions on `$(TargetFramework)` in `.props` files silently fail for single-targeting projects** — the property is empty during `.props` evaluation. Move TFM-conditional properties to `.targets` instead. ItemGroup and Target conditions are not affected.\n\nSee [targetframework-props-pitfall.md](references\u002Ftargetframework-props-pitfall.md) for the full explanation.\n\n## Directory.Build.props\n\nGood candidates: language settings, assembly\u002Fpackage metadata, build warnings, code analysis, common analyzers.\n\n```xml\n\u003CProject>\n  \u003CPropertyGroup>\n    \u003CNullable>enable\u003C\u002FNullable>\n    \u003CImplicitUsings>enable\u003C\u002FImplicitUsings>\n    \u003CTreatWarningsAsErrors>true\u003C\u002FTreatWarningsAsErrors>\n    \u003CEnforceCodeStyleInBuild>true\u003C\u002FEnforceCodeStyleInBuild>\n    \u003CCompany>Contoso\u003C\u002FCompany>\n    \u003CAuthors>Contoso Engineering\u003C\u002FAuthors>\n  \u003C\u002FPropertyGroup>\n\u003C\u002FProject>\n```\n\n**Do NOT put here:** project-specific TFMs, project-specific PackageReferences, targets\u002Fbuild logic, or properties depending on SDK-defined values (not available during `.props` evaluation).\n\n## Directory.Build.targets\n\nGood candidates: custom build targets, late-bound property overrides (values depending on SDK properties), post-build validation.\n\n```xml\n\u003CProject>\n  \u003CTarget Name=\"ValidateProjectSettings\" BeforeTargets=\"Build\">\n    \u003CError Text=\"All libraries must target netstandard2.0 or higher\"\n           Condition=\"'$(OutputType)' == 'Library' AND '$(TargetFramework)' == 'net472'\" \u002F>\n  \u003C\u002FTarget>\n\n  \u003CPropertyGroup>\n    \u003C!-- DocumentationFile depends on OutputPath, which is set by the SDK -->\n    \u003CDocumentationFile Condition=\"'$(IsPackable)' == 'true'\">$(OutputPath)$(AssemblyName).xml\u003C\u002FDocumentationFile>\n  \u003C\u002FPropertyGroup>\n\u003C\u002FProject>\n```\n\n## Directory.Packages.props (Central Package Management)\n\nCentral Package Management (CPM) provides a single source of truth for all NuGet package versions. See [https:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Fnuget\u002Fconsume-packages\u002Fcentral-package-management](https:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Fnuget\u002Fconsume-packages\u002Fcentral-package-management) for details.\n\n**Enable CPM in `Directory.Packages.props` at the repo root:**\n\n```xml\n\u003CProject>\n  \u003CPropertyGroup>\n    \u003CManagePackageVersionsCentrally>true\u003C\u002FManagePackageVersionsCentrally>\n  \u003C\u002FPropertyGroup>\n\n  \u003CItemGroup>\n    \u003CPackageVersion Include=\"Microsoft.Extensions.Logging\" Version=\"8.0.0\" \u002F>\n    \u003CPackageVersion Include=\"Newtonsoft.Json\" Version=\"13.0.3\" \u002F>\n    \u003CPackageVersion Include=\"xunit\" Version=\"2.9.0\" \u002F>\n    \u003CPackageVersion Include=\"xunit.runner.visualstudio\" Version=\"2.8.2\" \u002F>\n  \u003C\u002FItemGroup>\n\n  \u003CItemGroup>\n    \u003C!-- GlobalPackageReference applies to ALL projects — great for analyzers -->\n    \u003CGlobalPackageReference Include=\"StyleCop.Analyzers\" Version=\"1.2.0-beta.556\" \u002F>\n    \u003CGlobalPackageReference Include=\"Microsoft.CodeAnalysis.NetAnalyzers\" Version=\"8.0.0\" \u002F>\n  \u003C\u002FItemGroup>\n\u003C\u002FProject>\n```\n\n## Directory.Build.rsp\n\nContains default MSBuild CLI arguments applied to all builds under the directory tree.\n\n**Example `Directory.Build.rsp`:**\n\n```\n\u002Fmaxcpucount\n\u002FnodeReuse:false\n\u002FconsoleLoggerParameters:Summary;ForceNoAlign\n\u002FwarnAsMessage:MSB3277\n```\n\n- Works with both `msbuild` and `dotnet` CLI in modern .NET versions\n- Great for enforcing consistent CI and local build flags\n- Each argument goes on its own line\n\n## Multi-level Directory.Build Files\n\nMSBuild only auto-imports the **first** `Directory.Build.props` (or `.targets`) it finds walking up from the project directory. To chain multiple levels, explicitly import the parent at the **top** of the inner file. See [multi-level-examples](references\u002Fmulti-level-examples.md) for full file examples.\n\n```xml\n\u003CProject>\n  \u003CImport Project=\"$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)..\u002F'))\"\n         Condition=\"Exists('$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)..\u002F'))')\" \u002F>\n\n  \u003C!-- Inner-level overrides go here -->\n\u003C\u002FProject>\n```\n\n**Example layout:**\n\n```\nrepo\u002F\n  Directory.Build.props          ← repo-wide (lang version, company info, analyzers)\n  Directory.Build.targets        ← repo-wide targets\n  Directory.Packages.props       ← central package versions\n  src\u002F\n    Directory.Build.props        ← src-specific (imports repo-level, sets IsPackable=true)\n  test\u002F\n    Directory.Build.props        ← test-specific (imports repo-level, sets IsPackable=false, adds test packages)\n```\n\n## Artifact Output Layout (.NET 8+)\n\nSet `\u003CArtifactsPath>$(MSBuildThisFileDirectory)artifacts\u003C\u002FArtifactsPath>` in `Directory.Build.props` to automatically produce project-name-separated `bin\u002F`, `obj\u002F`, and `publish\u002F` directories under a single `artifacts\u002F` folder, avoiding bin\u002Fobj clashes by default. See [common-patterns](references\u002Fcommon-patterns.md) for the directory layout and additional patterns (conditional settings by project type, post-pack validation).\n\n## Workflow: Organizing Build Infrastructure\n\n1. **Audit all `.csproj` files** — Catalog every `\u003CPropertyGroup>`, `\u003CItemGroup>`, and custom `\u003CTarget>` across the solution. Note which settings repeat and which are project-specific.\n2. **Create root `Directory.Build.props`** — Move shared property defaults (LangVersion, Nullable, TreatWarningsAsErrors, metadata) here. These are imported before the project file so projects can override them.\n3. **Create root `Directory.Build.targets`** — Move custom build targets, post-build validation, and any properties that depend on SDK-defined values (e.g., `OutputPath`, `TargetFramework` for single-targeting projects) here. These are imported after the SDK so all properties are available.\n4. **Create `Directory.Packages.props`** — Enable Central Package Management (`ManagePackageVersionsCentrally`), list all `PackageVersion` entries, and remove `Version=` from `PackageReference` items in `.csproj` files.\n5. **Set up multi-level hierarchy** — Create inner `Directory.Build.props` files for `src\u002F` and `test\u002F` folders with distinct settings. Use `GetPathOfFileAbove` to chain to the parent.\n6. **Simplify `.csproj` files** — Remove all centralized properties, version attributes, and duplicated targets. Each project should only contain what is unique to it.\n7. **Validate** — Run restore\u002Fbuild against the discovered `.sln`, `.slnx`,\n   `.proj`, or project path, for example\n   `dotnet restore \u003Centrypoint> && dotnet build \u003Centrypoint>`. If no root\n   entrypoint exists, validate each discovered project explicitly instead of\n   claiming a repo-root build. Use\n   `dotnet msbuild \u003Cproject> -pp:output.xml` to inspect the final merged view.\n\n## Troubleshooting\n\n| Problem | Cause | Fix |\n|---|---|---|\n| `Directory.Build.props` isn't picked up | File name casing wrong (exact match required on Linux\u002FmacOS) | Verify exact casing: `Directory.Build.props` (capital D, B) |\n| Properties from `.props` are ignored by projects | Project sets the same property after the import | Move the property to `Directory.Build.targets` to set it after the project |\n| Multi-level import doesn't work | Missing `GetPathOfFileAbove` import in inner file | Add the `\u003CImport>` element at the top of the inner file (see Multi-level section) |\n| Properties using SDK values are empty in `.props` | SDK properties aren't defined yet during `.props` evaluation | Move to `.targets` which is imported after the SDK |\n| `Directory.Packages.props` not found | File not at repo root or not named exactly | Must be named `Directory.Packages.props` and at or above the project directory |\n| Property condition on `$(TargetFramework)` doesn't match in `.props` | `TargetFramework` isn't set yet for single-targeting projects during `.props` evaluation | Move property to `.targets`, or use ItemGroup\u002FTarget conditions instead (which evaluate late) |\n\n**Diagnosis:** Use the preprocessed project output to see all imports and final property values:\n\n```bash\ndotnet msbuild -pp:output.xml MyProject.csproj\n```\n\nThis expands all imports inline so you can see exactly where each property is set and what the final evaluated value is.\n",{"name":5,"license":15,"description":7},"main","f8f2bfd77819bb789d4736ce7db4a567a37fcf7e",".agents\u002Fskills\u002Fdirectory-build-organization",315,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Ftestfx","https:\u002F\u002Fgithub.com\u002Fmicrosoft","https:\u002F\u002Fopensource.microsoft.com","Open source projects and samples from Microsoft","2026-11-14 14:01:43",{"source":8,"skillName":5,"commands":56,"prompt":66,"zipAvailable":67},[57,60,63],{"tool":58,"command":59},"npx","npx skills add microsoft\u002Ftestfx --skill directory-build-organization",{"tool":61,"command":62},"bunx","bunx skills add microsoft\u002Ftestfx --skill directory-build-organization",{"tool":64,"command":65},"pnpm","pnpm dlx skills add microsoft\u002Ftestfx --skill directory-build-organization","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Ftestfx\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fdirectory-build-organization\u002FSKILL.md",true,[69,75,79],{"path":70,"resourceType":71,"resourceTypeDesc":72,"sizeBytes":73,"sourceHtmlUrl":74},"references\u002Fcommon-patterns.md","REFERENCE","参考文档",1411,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Ftestfx\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fdirectory-build-organization\u002Freferences\u002Fcommon-patterns.md",{"path":76,"resourceType":71,"resourceTypeDesc":72,"sizeBytes":77,"sourceHtmlUrl":78},"references\u002Fmulti-level-examples.md",4001,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Ftestfx\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fdirectory-build-organization\u002Freferences\u002Fmulti-level-examples.md",{"path":80,"resourceType":71,"resourceTypeDesc":72,"sizeBytes":81,"sourceHtmlUrl":82},"references\u002Ftargetframework-props-pitfall.md",3427,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Ftestfx\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fdirectory-build-organization\u002Freferences\u002Ftargetframework-props-pitfall.md",[84,110,139,159,178,203],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":41},"01M70GYY0AV0JGMTHE2CN6TNYK","dotnet-breaking-changes","Use before changing .NET\u002FC# code whose callers you do not control: a NuGet library, or a repo with PublicAPI.Shipped\u002FUnshipped.txt, ApiCompat, multiple TargetFrameworks, InternalsVisibleTo, or generated (.g.cs) partials. Green builds miss silent breaks from optional parameters, parameter names, sealing, const values, nullability, and #if. USE FOR: \"without breaking existing callers\"; adding a public method, overload, optional parameter, or interface member to a shipped library; renaming a public method or an internal helper a friend assembly uses; consolidating duplicated logic; changing a signature, nullability, default, or attribute; adding a target framework; RS0016\u002FRS0017 or ApiCompat errors; \"is this PR breaking?\". For a rename, extract, or merge, also invoke csharp-refactoring. DO NOT USE FOR: an executable whose callers all live in one project; renaming a local variable or private member, even in a shipped library; formatting; framework\u002FSDK\u002FNuGet upgrades (use dotnet-upgrade).","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Ftestfx\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fdotnet-breaking-changes\u002FSKILL.md",[],[91,92,93,94,31,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109],"dotnet","dotnet breaking changes","changes","green","default","local","errors","interface","generated","upgrade","invoke","you","code","refactoring","merge","rename","library","live","assembly",{"skillNo":111,"name":112,"nameZh":6,"description":113,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":114,"categories":115,"keywords":121,"publishedAt":41},"01M699HHE9DTZWAMPB1ZR7ZKSW","testfx-test-value-evidence","Apply the vendored test-value-evidence skill with TestFx toolchain, assertion, parallel-safety, packed-consumer, and review conventions. Use when implementing or reviewing behavior-changing TestFx PRs or commits, including source-only changes.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Ftestfx\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Ftestfx-test-value-evidence\u002FSKILL.md",[116],{"categoryNo":117,"categoryName":118,"taxonomyType":119,"taxonomyTypeDesc":120},"01JBSEEDCAT000000000000008","测试与质量","SCENARIO","使用场景",[122,123,124,125,126,127,128,129,130,131,132,36,133,24,134,135,93,136,137,138],"test","testfx test value evidence","test value evidence","evidence","value","review","parallel","toolchain","commits","implementing","prs","use","apply","with","behavior","Safety","conventions",{"skillNo":140,"name":141,"nameZh":6,"description":142,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":143,"categories":144,"keywords":145,"publishedAt":41},"01M699HEYWH1B9XGNBFY8J2FZS","testfx-parallel-safety-preflight","Check concurrency and isolation before implementing or refactoring TestFx tests, lifecycle code, helpers, shared-state declarations, or production paths those tests exercise. Use before narrowing DoNotParallelize or ResourceLock, changing parallelization settings, or introducing asynchronous workers; repeat against the final diff.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Ftestfx\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Ftestfx-parallel-safety-preflight\u002FSKILL.md",[],[146,137,147,128,32,148,131,149,103,150,104,151,152,153,154,155,156,157,133,158],"testfx parallel safety preflight","preflight","asynchronous","exercise","concurrency","paths","isolation","helpers","diff","parallelization","lifecycle","tests","workers",{"skillNo":160,"name":161,"nameZh":6,"description":162,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":163,"categories":164,"keywords":165,"publishedAt":41},"01M699HC61ZV9GJ2C8JV03951G","testfx-localization-validation","Validate generated TestFx localization catalogs, resource IDs, placeholders and locked tokens. Use for RESX\u002FXLF changes, OneLoc PRs, localization build failures, duplicate targets or units, and orphaned translation entries.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Ftestfx\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Ftestfx-localization-validation\u002FSKILL.md",[],[166,167,168,169,170,171,172,173,174,132,99,133,175,176,93,177,20],"testfx localization validation","validation","localization","validate","translation","ids","for","tokens","entries","units","duplicate","targets",{"skillNo":179,"name":180,"nameZh":6,"description":181,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":182,"categories":183,"keywords":185,"publishedAt":41},"01M699H9J2NWQXE4BDT6R0FH7S","testfx-acceptance-validation","Validate TestFx shipping paths and capable CI execution using packed consumers, package\u002Fcache provenance, exact exits and artifacts, and selected-versus-executed test evidence. Use for acceptance regressions, package\u002FMSBuild\u002Flauncher\u002Fprotocol changes, or skipped-only CI results; not for unrelated unit-only or documentation changes.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Ftestfx\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Ftestfx-acceptance-validation\u002FSKILL.md",[184],{"categoryNo":117,"categoryName":118,"taxonomyType":119,"taxonomyTypeDesc":120},[186,187,167,122,188,125,189,190,191,36,192,133,193,194,195,196,197,198,199,200,201,202,151,172],"testfx acceptance validation","acceptance","msbuild","launcher","ci","execution","package","cache","artifacts","provenance","documentation","unrelated","shipping","results","protocol","unit","ci results",{"skillNo":204,"name":205,"nameZh":6,"description":206,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":207,"categories":208,"keywords":209,"publishedAt":41},"01M699H70BB999BT4F627T1PHE","session-delivery-hygiene","Gate local-session scope, persistent delivery, live PR state, integration provenance, and owned cleanup. Use before implementing guidance changes, changing or pushing PR work, diagnosing package\u002Foutput mismatches, or handing off implementation.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Ftestfx\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fsession-delivery-hygiene\u002FSKILL.md",[],[210,211,212,213,30,131,96,214,215,108,216,192,133,195,217,218,93,219,220,221],"session delivery hygiene","delivery","session","hygiene","cleanup","work","pr","output","state","integration","guidance","gate"]