Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fast up-to-date check supports TargetPath for CopyToOutputDirectory items #7470

Merged
merged 3 commits into from Aug 12, 2021

Conversation

drewnoakes
Copy link
Member

@drewnoakes drewnoakes commented Aug 9, 2021

Fixes #7276

Source items which participate in CopyToOutputDirectory may specify TargetPath metadata to control their location relative to the output directory.

Historically, Link metadata has been used to control this, and that was supported here. Now, we support both TargetPath and Link.

Microsoft Reviewers: Open in CodeFlow

This message is more useful when it explains the file paths in question.
It is a more descriptive name, and plays better with subsequent changes.
@drewnoakes drewnoakes requested a review from a team as a code owner August 9, 2021 12:23
@ghost ghost added the Feature-Up-to-date Build up-to-date check that avoids shelling out to MSBuild unless necessary. label Aug 9, 2021
@drewnoakes drewnoakes added this to the 17.0 milestone Aug 9, 2021
Copy link
Contributor

@jjmew jjmew left a comment

Choose a reason for hiding this comment

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

:shipit:

Copy link
Member

@swesonga swesonga left a comment

Choose a reason for hiding this comment

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

Is there an easy way to get those unit test failure messages to specify what is being counted? 15 != 16 is not as helpful as we'd like.

Source items which participate in `CopyToOutputDirectory` may specify `TargetPath` metadata to control their location relative to the output directory.

Historically, `Link` metadata has been used to control this, and that was supported here. Now, we support both `TargetPath` and `Link`.
@drewnoakes
Copy link
Member Author

Is there an easy way to get those unit test failure messages to specify what is being counted? 15 != 16 is not as helpful as we'd like.

xUnit's assertions lib doesn't accept messages uniformly across its methods. Assert.True/False do, from memory, but not the others. Generally when we see failures here I look at the line number to work out which line failed.

@drewnoakes drewnoakes merged commit d505684 into dotnet:main Aug 12, 2021
@drewnoakes drewnoakes deleted the fix-7276-futd-target-path branch August 12, 2021 12:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature-Up-to-date Build up-to-date check that avoids shelling out to MSBuild unless necessary.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CopyToOutputDirectory Does Not Respect PreserveNewest and TargetPath
3 participants