Skip to content

Fix underbuild with ref assemblies in Visual Studio#6918

Merged
rainersigwald merged 1 commit into
dotnet:vs16.11from
rainersigwald:copycomplete-incrementalclean
Oct 7, 2021
Merged

Fix underbuild with ref assemblies in Visual Studio#6918
rainersigwald merged 1 commit into
dotnet:vs16.11from
rainersigwald:copycomplete-incrementalclean

Conversation

@rainersigwald
Copy link
Copy Markdown
Member

@rainersigwald rainersigwald commented Oct 7, 2021

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.

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.
@rainersigwald rainersigwald merged commit f322596 into dotnet:vs16.11 Oct 7, 2021
@rainersigwald rainersigwald deleted the copycomplete-incrementalclean branch October 7, 2021 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants