Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.