Skip to content

Commit 74afda2

Browse files
authored
Merge pull request #10683 from myd7349/patch-1
Change inline code to code block for better copy friendliness
2 parents eeaea7b + 84f8612 commit 74afda2

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

docs/msbuild/customize-by-directory.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ For example, here's a *Directory.Build.props* file that sets the output director
4646

4747
1. Clean the solution to remove any old output files.
4848

49-
`msbuild /t:Clean SolutionName.sln`
49+
```
50+
msbuild /t:Clean SolutionName.sln
51+
```
5052

5153
1. Create a new file in the root of your repo called *Directory.Build.props*.
5254

@@ -115,7 +117,9 @@ It might be desirable to have common properties for all projects *(1)*, common p
115117

116118
To make MSBuild correctly merge the "inner" files (*2-src* and *2-test*) with the "outer" file (*1*), you must take into account that once MSBuild finds a *Directory.Build.props* file, it stops further scanning. To continue scanning and merge into the outer file, place this code into both inner files:
117119

118-
`<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" />`
120+
```xml
121+
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" />
122+
```
119123

120124
A summary of MSBuild's general approach is as follows:
121125

0 commit comments

Comments
 (0)