Fix underbuild with ref assemblies in Visual Studio#6918
Merged
rainersigwald merged 1 commit intoOct 7, 2021
Conversation
Fixes dotnet#6917 by ensuring that the copy-marker file is _always_ added to the FileWrites item if the copy-referenced-assemblies target runs so that IncrementalClean never sees it as an 'orphan' file and then deletes it.
Forgind
approved these changes
Oct 7, 2021
benvillalobos
approved these changes
Oct 7, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #6917 by ensuring that the copy-marker file is always added
to the FileWrites item if the copy-referenced-assemblies target runs
so that IncrementalClean never sees it as an 'orphan' file and then
deletes it.
Work item (Internal use): AB#1417029
Summary
In some common situations, Visual Studio will not build a project that should build.
Customer Impact
This can result in debugging or unit test execution running against stale binaries that don't have the user's latest changes. That's a baffling and intensely frustrating user experience.
Regression?
Yes, in Visual Studio 16.11.4 and 17.0-preview3.
The bug is longstanding (since 15.6), but was masked by #6576 which caused Visual Studio overbuild.
Testing
Private patching shows expected behavior; users experiencing the problem who applied a roughly-equivalent workaround have reported that it fixes their issues and not reported new ones.
Risk
Low. Adds a file to the list of files that would be written to the output directory. We validated that adding nonexistent files to that list is harmless, so even if the file doesn't get written (for some reason) builds will still succeed.
However, this target is run in basically all builds, so unexpected impacts would potentially have wide scope.