Skip to content

Commit 5502551

Browse files
authored
Add docs for project properties that control PDBs and XML publishing (#31473)
1 parent 13f3187 commit 5502551

File tree

1 file changed

+33
-1
lines changed

1 file changed

+33
-1
lines changed

docs/core/project-sdk/msbuild-props.md

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,9 @@ The following MSBuild properties are documented in this section:
173173
- [PreserveCompilationContext](#preservecompilationcontext)
174174
- [PreserveCompilationReferences](#preservecompilationreferences)
175175
- [ProduceReferenceAssemblyInOutDir](#producereferenceassemblyinoutdir)
176+
- [PublishDocumentationFile](#publishdocumentationfile)
177+
- [PublishDocumentationFiles](#publishdocumentationfiles)
178+
- [PublishReferencesDocumentationFiles](#publishreferencesdocumentationfiles)
176179
- [PublishRelease](#publishrelease)
177180
- [RollForward](#rollforward)
178181
- [RuntimeFrameworkVersion](#runtimeframeworkversion)
@@ -323,6 +326,21 @@ In .NET 5 and earlier versions, reference assemblies are always written to the `
323326

324327
For more information, see [Write reference assemblies to intermediate output](../compatibility/sdk/6.0/write-reference-assemblies-to-obj.md).
325328

329+
### PublishDocumentationFile
330+
331+
When this property is `true`, the XML documentation file for the project, if one is generated, is included in the publish output for the project. This property defaults to `true`.
332+
333+
> [!TIP]
334+
> Set [GenerateDocumentationFile](#generatedocumentationfile)) to `true` to generate an XML documentation file at compile time.
335+
336+
### PublishDocumentationFiles
337+
338+
This property is an enablement flag for several other properties that control whether various kinds of XML documentation files are copied to the publish directory by default, namely [PublishDocumentationFile](#publishdocumentationfile) and [PublishReferencesDocumentationFiles](#publishreferencesdocumentationfiles). If those properties are unset, and this property is set, then those properties will default to `true`. This property defaults to `true`.
339+
340+
### PublishReferencesDocumentationFiles
341+
342+
When this property is `true`, XML documentation files for the project's references are copied to the publish directory, instead of just run-time assets like DLL files. This property defaults to `true`.
343+
326344
### PublishRelease
327345

328346
The `PublishRelease` property informs `dotnet publish` to use the `Release` configuration by default instead of the `Debug` configuration.
@@ -434,10 +452,12 @@ Numerous MSBuild properties are available to fine tune trimming, which is a feat
434452
| `TrimmerSingleWarn` | `true` or `false` | Controls whether a single warning per assembly is shown or all warnings. |
435453
| `TrimmerRemoveSymbols` | `true` or `false` | Controls whether all symbols are removed from a trimmed application. |
436454

437-
## Compilation-related properties
455+
## Build-related properties
438456

439457
The following MSBuild properties are documented in this section:
440458

459+
- [CopyDebugSymbolFilesFromPackages](#copydebugsymbolfilesfrompackages)
460+
- [CopyDocumentationFilesFromPackages](#copydocumentationfilesfrompackages)
441461
- [DisableImplicitFrameworkDefines](#disableimplicitframeworkdefines)
442462
- [DocumentationFile](#documentationfile)
443463
- [EmbeddedResourceUseDependentUponConvention](#embeddedresourceusedependentuponconvention)
@@ -448,6 +468,18 @@ The following MSBuild properties are documented in this section:
448468

449469
C# compiler options, such as `LangVersion` and `Nullable`, can also be specified as MSBuild properties in your project file. For more information, see [C# compiler options](../../csharp/language-reference/compiler-options/index.md).
450470

471+
### CopyDebugSymbolFilesFromPackages
472+
473+
When this property is set to `true`, all symbol files (also known as PDB files) from `PackageReference` items in the project are copied to the build output. These files can provide more informative stack traces for exceptions and make memory dumps and traces of the running application easier to understand. However, including these files results in an increased deployment bundle size.
474+
475+
This property was introduced in .NET SDK 7.0.100, though it defaults to not being specified.
476+
477+
### CopyDocumentationFilesFromPackages
478+
479+
When this property is set to `true`, all generated XML documentation files from `PackageReference` items in the project are copied to the build output. Note that enabling this feature will result in increased deployment bundle size.
480+
481+
This property was introduced in .NET SDK 7.0.100, though it defaults to not being specified.
482+
451483
### DisableImplicitFrameworkDefines
452484

453485
The `DisableImplicitFrameworkDefines` property controls whether or not the SDK generates preprocessor symbols for the target framework and platform for the .NET project. When this property is set to `false` or is unset (which is the default value) preprocessor symbols are generated for:

0 commit comments

Comments
 (0)