Choosing a CopyToOutputDirectory Mode Overview The metadata (and its publish counterpart ) controls whether an item — , , , or — is copied next to your build output, and under what conditions the copy happens. Picking the wrong mode causes either stale files in or an unnecessary per-build performance hit. As of MSBuild 17.13 / .NET SDK 9.0.2xx there are four values: | Mode | Copies when… | Incremental cost | Typical use | | --- | --- | --- | --- | | (default) | Never | None | Files not needed at runtime | | | Source is newer than destination (or destination missing) | Cheap (timestamp check)…