Ensures build project structure in the DarkPatterns project style, which leverages solution-wide settings.
-
Create a
Directory.Build.propsin the root of the repository, along with the solution, with the following structure:<?xml version="1.0" encoding="utf-8" ?> <Project> <PropertyGroup> <UseArtifactsOutput>true</UseArtifactsOutput> <RootNamespace>Your.Namespace</RootNamespace> </PropertyGroup> <ItemGroup> <PackageReference Include="DarkPatterns.Build.Structure" Version="0.1.0" PrivateAssets="All" /> </ItemGroup> </Project>
Optionally, also include the following properties:
<PropertyGroup> <SolutionRoot>$(MSBuildThisFileDirectory)</SolutionRoot> <RepositoryEngineeringDir>$(SolutionRoot)eng/</RepositoryEngineeringDir> </PropertyGroup>
| Name | Decription | Default |
|---|---|---|
| UseArtifactsOutput | See Microsoft's documentation for Artifacts output layout; must be set to true |
N/A |
| RootNamespace | See Microsoft's documentation for Common MSBuild project properties | $(MSBuildProjectName.Replace(" ", "_")) |
| SolutionRoot1 | Should be the directory where the solution exists. Must end with trailing /. |
Directory containing the Directory.Build.props |
| RepositoryEngineeringDir1 | Must be set to $(SolutionRoot)eng/ |
$(SolutionRoot)eng/ |