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/common-msbuild-project-properties.md
+4Lines changed: 4 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -58,6 +58,8 @@ The following table lists frequently used properties that are defined in the Vis
58
58
| DefineTrace | All | A boolean value that indicates whether you want the TRACE constant defined. |
59
59
| DelaySign | .NET | A boolean value that indicates whether you want to delay-sign the assembly rather than full-sign it. |
60
60
| Deterministic | .NET | A boolean value that indicates whether the compiler should produce identical assemblies for identical inputs. This parameter corresponds to the `/deterministic` switch of the compilers. |
61
+
| DirectoryBuildPropsPath | All | Specifies the path to the *Directory.Build.props* file; if defined, this property overrides the default search algorithm. See [Customize your build](customize-your-build.md#directorybuildprops-and-directorybuildtargets). |
62
+
| DirectoryBuildTargetsPath| All | Specifies the path to the *Directory.Build.targets* file; if defined, this property overrides the default search algorithm. See [Customize your build](customize-your-build.md#directorybuildprops-and-directorybuildtargets). |
61
63
| DisableFastUpToDateCheck | All | A boolean value that applies to Visual Studio only. The Visual Studio build manager uses a process called FastUpToDateCheck to determine whether a project must be rebuilt to be up to date. This process is faster than using MSBuild to determine this. Setting the DisableFastUpToDateCheck property to `true` lets you bypass the Visual Studio build manager and force it to use MSBuild to determine whether the project is up to date. |
62
64
| DocumentationFile | .NET | The name of the file that is generated as the XML documentation file. This name includes only the file name and has no path information. |
63
65
| ErrorReport | .NET | Specifies how the compiler task should report internal compiler errors. Valid values are "prompt," "send," or "none." This property is equivalent to the `/errorreport` compiler switch. |
@@ -67,6 +69,8 @@ The following table lists frequently used properties that are defined in the Vis
67
69
| GenerateDocumentation | .NET | A boolean parameter that indicates whether documentation is generated by the build. If `true`, the build generates documentation information and puts it in an *.xml* file together with the name of the executable file or library that the build task created. |
68
70
| GenerateFullPaths | C# | Generate full paths for filenames in output by using the [-fullpaths](/dotnet/csharp/language-reference/compiler-options/fullpaths-compiler-option) compiler option. |
69
71
| GenerateSerializationAssemblies | .NET | Indicates whether XML serialization assemblies should be generated by *SGen.exe*, which can be set to on, auto, or off. This property is used for assemblies that target .NET Framework only. To generate XML serialization assemblies for .NET Standard or .NET Core assemblies, reference the *Microsoft.XmlSerializer.Generator* NuGet package. |
72
+
| ImportDirectoryBuildProps | All | A boolean value that indicates whether to import a *Directory.Build.props* file. See [Customize your build](customize-your-build.md#directorybuildprops-and-directorybuildtargets).|
73
+
| ImportDirectoryBuildTargets | All | A boolean value that indicates whether to import a *Directory.Build.targets* file. See [Customize your build](customize-your-build.md#directorybuildprops-and-directorybuildtargets). |
70
74
| IntermediateOutputPath | All | The full intermediate output path as derived from `BaseIntermediateOutputPath`, if no path is specified. For example, *obj\debug\\*. |
71
75
| KeyContainerName | All | The name of the strong-name key container. |
72
76
| KeyOriginatorFile | All | The name of the strong-name key file. |
Copy file name to clipboardExpand all lines: docs/msbuild/customize-your-build.md
+4-1Lines changed: 4 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -106,10 +106,13 @@ A summary of MSBuild's general approach is as follows:
106
106
- 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.
107
107
- If you want multiple levels to be found and merged, then [`<Import...>`](../msbuild/property-functions.md#msbuild-getpathoffileabove) (shown above) the "outer" file from the "inner" file.
108
108
- If the "outer" file does not itself also import something above it, then scanning stops there.
109
-
- To control the scanning/merging process, use `$(DirectoryBuildPropsPath)` and `$(ImportDirectoryBuildProps)`.
110
109
111
110
Or more simply: the first *Directory.Build.props* that doesn't import anything is where MSBuild stops.
112
111
112
+
To control the import process more explicitly, use the properties `$(DirectoryBuildPropsPath)`, `$(ImportDirectoryBuildProps)`, `$(DirectoryBuildTargetsPath)`, and `$(ImportDirectoryBuildTargets)`. The property `$(DirectoryBuildPropsPath)` specifies the path to the `Directory.Build.props` file to use; similarly, `$(DirectoryBuildTargetsPath)` specifies the path to the `Directory.Build.targets` file.
113
+
114
+
The Boolean properties `$(ImportDirectoryBuildProps)` and `$(ImportDirectoryBuildTargets)` are set to `true` by default, so MSBuild normally searches for these files, but you can set them to `false` to prevent MSBuild from importing them.
115
+
113
116
### Choose between adding properties to a .props or .targets file
114
117
115
118
MSBuild is import-order dependent, and the last definition of a property (or a `UsingTask` or target) is the definition used.
0 commit comments