Skip to content

Add option to disable CopyFilesMarkedCopyLocal target#395

Merged
jeffkl merged 4 commits intomicrosoft:mainfrom
ViktorHofer:patch-5
Nov 7, 2022
Merged

Add option to disable CopyFilesMarkedCopyLocal target#395
jeffkl merged 4 commits intomicrosoft:mainfrom
ViktorHofer:patch-5

Conversation

@ViktorHofer
Copy link
Copy Markdown
Member

@ViktorHofer ViktorHofer commented Oct 15, 2022

This adds a new property SkipCopyFilesMarkedCopyLocal which can be set to true to disable the CopyFilesMarkedCopyLocal target.

<PropertyGroup>
  <SkipCopyFilesMarkedCopyLocal>true</SkipCopyFilesMarkedCopyLocal>
</PropertyGroup>

… is false

We use the NoTargets Sdk in multiple places in dotnet/runtime and some intentionally set NoTargetsDoNotReferenceOutputAssemblies to false so that references are calculated. This is handy when operations are performed on declared ProjectReference items. To make sure that references aren't copied to an output directory, disable the `_CopyFilesMarkedCopyLocal` target.
Comment thread src/NoTargets/Sdk/Sdk.targets Outdated
@jeffkl jeffkl changed the title Avoid copying references when NoTargetsDoNotReferenceOutputAssemblies… Add option to disable CopyFilesMarkedCopyLocal target Oct 28, 2022
Copy link
Copy Markdown
Member Author

@ViktorHofer ViktorHofer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this looks great!

@jeffkl jeffkl enabled auto-merge (squash) November 7, 2022 19:45
@jeffkl jeffkl disabled auto-merge November 7, 2022 20:43
@jeffkl jeffkl merged commit 4637043 into microsoft:main Nov 7, 2022
@ViktorHofer ViktorHofer deleted the patch-5 branch November 8, 2022 07:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants