Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

README.md

DarkPatterns.Build.Structure

Ensures build project structure in the DarkPatterns project style, which leverages solution-wide settings.

  1. Create a Directory.Build.props in 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>

Configuration

Properties

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/

Footnotes

  1. These properties cannot be used within your project unless explicitly set. 2