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

Fix incremental build break #2263

Merged
merged 2 commits into from
Apr 10, 2020
Merged

Conversation

llongley
Copy link
Member

@llongley llongley commented Apr 9, 2020

Description

This adds a targets file that our test projects import that fixes up our copy-local items from Microsoft.UI.Xaml.vcxproj. That project reports the files from its $(IntDir), but those are deleted during IncrementalClean if they weren't built, leading to build breaks. The targets file includes a target that repoints those files to Microsoft.UI.Xaml.vcxproj's $(OutDir) instead, which is where those files ultimately end up.

I'm not sure what changed here in VS 16.5 - either IncrementalClean changed to delete these files when it wasn't deleting them before, or the importing of copy-local items was changed. I suspect this may be working around a bug in VS of some sort. Either way, repointing the files that include the project to its $(OutDir) fixes the issue.

Motivation and Context

Fixes #2221

How Has This Been Tested?

Compiled the solution fully, then made a dummy change in Microsoft.UI.Xaml.vcxproj and built incrementally. Verified both that the build only built the file that was changed and that there were no build errors in other projects.

llongley added 2 commits April 8, 2020 20:52
…target so we're sure that IntDir and OutDir have been populated by the time we get to them.
Copy link
Collaborator

@marcelwgn marcelwgn left a comment

Choose a reason for hiding this comment

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

Tried to replicate the build errors over 10 times and they didn't occur once. This fixes it!

Thank you for fixing this @llongley and drastically improving the dev workflow !

@ranjeshj
Copy link
Contributor

ranjeshj commented Apr 9, 2020

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@llongley llongley requested a review from ranjeshj April 10, 2020 00:44
@ranjeshj ranjeshj merged commit 1bc7eb0 into master Apr 10, 2020
@ranjeshj ranjeshj deleted the user/llongley/FixIncrementalBuild branch April 10, 2020 02:23
@StephenLPeters StephenLPeters added area-DevInternal Internal build infrastructure, code cleanup, engineering efficiency team-Controls Issue for the Controls team and removed needs-triage Issue needs to be triaged by the area owners labels Apr 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-DevInternal Internal build infrastructure, code cleanup, engineering efficiency team-Controls Issue for the Controls team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Compile resulting in "Could not copy file" errors with Visual Studio 2019 Build 16.5
5 participants