Skip to content

Commit

Permalink
Update Configuration.md
Browse files Browse the repository at this point in the history
$(MSBuildThisFileDirectory) can be used to simplify the .props file
  • Loading branch information
mayermart authored Nov 27, 2020
1 parent aa26bda commit 94b6d26
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions documentation/Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -690,15 +690,10 @@ Example `.props` file:
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<CodeAnalysisRuleSetLocation Condition=" '$(NuGetPackageRoot)' != '' ">$(NuGetPackageRoot)\acme.stylecop\1.0.0</CodeAnalysisRuleSetLocation>
<CodeAnalysisRuleSetLocation Condition=" '$(CodeAnalysisRuleSetLocation)' == '' and '$(SolutionDir)' != '' ">$(SolutionDir)\packages\acme.stylecop.1.0.0</CodeAnalysisRuleSetLocation>
<CodeAnalysisRuleSetLocation Condition=" '$(CodeAnalysisRuleSetLocation)' == '' ">$([System.IO.Path]::GetDirectoryName($(MSBuildProjectDirectory)))\packages\acme.stylecop.1.0.0</CodeAnalysisRuleSetLocation>
</PropertyGroup>
<PropertyGroup>
<CodeAnalysisRuleSet>$(CodeAnalysisRuleSetLocation)\acme.stylecop.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSet>$(MSBuildThisFileDirectory)..\acme.stylecop.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<AdditionalFiles Include="$(CodeAnalysisRuleSetLocation)\stylecop.json" Link="stylecop.json" />
<AdditionalFiles Include="$(MSBuildThisFileDirectory)..\stylecop.json" Link="stylecop.json" />
</ItemGroup>
</Project>
```

0 comments on commit 94b6d26

Please sign in to comment.