Skip to content

Commit 2d7e44e

Browse files
authored
Add some more information about CopyLocalLockFileAssemblies (#43233)
Explain that the default value of CopyLocalLockFileAssemblies varies by output type, and that copied files come from all transitively reachable packages, not just direct package references.
1 parent ca74c94 commit 2d7e44e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,14 +407,16 @@ For example, for a .NET 5 app and an RID of `win-x64`, the following setting cha
407407

408408
### CopyLocalLockFileAssemblies
409409

410-
The `CopyLocalLockFileAssemblies` property is useful for plugin projects that have dependencies on other libraries. If you set this property to `true`, any NuGet package dependencies are copied to the output directory. That means you can use the output of `dotnet build` to run your plugin on any machine.
410+
The `CopyLocalLockFileAssemblies` property is useful for plugin projects that have dependencies on other libraries. If you set this property to `true`, any transitive NuGet package dependencies are copied to the output directory. That means you can use the output of `dotnet build` to run your plugin on any machine.
411411

412412
```xml
413413
<PropertyGroup>
414414
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
415415
</PropertyGroup>
416416
```
417417

418+
The default value of `CopyLocalLockFileAssemblies` can vary based on the output type. For example, for class libraries the default value is `false`, while for console applications the default is `true`. You can specify this property explicitly to override the default if needed.
419+
418420
> [!TIP]
419421
> Alternatively, you can use `dotnet publish` to publish the class library. For more information, see [dotnet publish](../tools/dotnet-publish.md).
420422

0 commit comments

Comments
 (0)