You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/msbuild/customize-your-build.md
+8-9Lines changed: 8 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -23,8 +23,7 @@ translation.priority.ht:
23
23
- "fr-fr"
24
24
- "it-it"
25
25
- "ja-jp"
26
-
- "ko-kr"
27
-
- "pl-pl"
26
+
- "ko-kr"- "pl-pl"
28
27
- "pt-br"
29
28
- "ru-ru"
30
29
- "tr-tr"
@@ -72,7 +71,7 @@ Directory.Build.targets is imported from Microsoft.Common.targets after importin
72
71
73
72
## Use case: multi-level merging
74
73
75
-
Supposing you have this standard solution structure:
74
+
Suppose you have this standard solution structure:
76
75
77
76
````
78
77
\
@@ -88,18 +87,18 @@ Supposing you have this standard solution structure:
88
87
\Project2Tests
89
88
````
90
89
91
-
It may be desirable to have common properties for all projects `(1)`, common properties for `src` projects `(2-src)`, and common properties for `test` projects `(2-test)`.
90
+
It might be desirable to have common properties for all projects `(1)`, common properties for `src` projects `(2-src)`, and common properties for `test` projects `(2-test)`.
92
91
93
-
For msbuild to correctly merge the "inner" files (`2-src` and `2-test`) with the "outer" file (`1`), one 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 into both inner files:
92
+
For msbuild to 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 into both inner files:
A summary of msbuild's general approach is as follows:
98
97
99
-
-for any given project, msbuild finds the first `Directory.Build.props` upward in the solution structure, merges it with defaults, and stops scanning for more
100
-
-if you want multiple levels to be found and merged, then [`<Import...>`](http://docs.microsoft.com/en-us/visualstudio/msbuild/property-functions#msbuild-getpathoffileabove) (shown above) the "outer" file from the "inner" file
101
-
-if the "outer" file does not itself also import something above it, then scanning stops there
102
-
-to control the scanning/merging process, use `$(DirectoryBuildPropsPath)` and `$(ImportDirectoryBuildProps)`
98
+
-For any given project, msbuild finds the first `Directory.Build.props` upward in the solution structure, merges it with defaults, and stops scanning for more
99
+
-If you want multiple levels to be found and merged, then [`<Import...>`](http://docs.microsoft.com/en-us/visualstudio/msbuild/property-functions#msbuild-getpathoffileabove) (shown above) the "outer" file from the "inner" file
100
+
-If the "outer" file does not itself also import something above it, then scanning stops there
101
+
-To control the scanning/merging process, use `$(DirectoryBuildPropsPath)` and `$(ImportDirectoryBuildProps)`
103
102
104
103
Or more simply: the first `Directory.Build.props` which doesn't import anything, is where msbuild stops.
0 commit comments