-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Visual Studio FastUpToDate assumes Up-to-Date wrongly #6713
Comments
This may be fixed as of #6622. What happens when you set |
I added |
Team Triage: This doesn't reproduce with |
@benvillalobos I think @felix-ri's analysis is correct. The VS up-to-date check uses the copy marker to identify the up-to-date state of referenced projects. Can the CopyCompleted marker file be touched in |
@rainersigwald Do you have an idea the impact of this change? |
The problem also occurs with |
Team Triage: What's happening is the exe project doesn't have testfile.txt as an input. As a result, FUTD thinks it's up to date WRT its inputs because it's not aware of that input. If we were to change where the CopyComplete marker executed, it wouldn't have an impact because it only cares about implementation assemblies. @drewnoakes, are you suggesting changing the copycomplete marker to mean "did literally any copy actually happen?" If so, it may impact downstream referencing projects, but we don't think it's guaranteed to do so. FUTD would fail or return false more often. We'd have to decide whether that's an acceptable tradeoff. |
Another possibility here could be to skip FUTD on any project where a referenced project built (at the project-system layer). That wouldn't be ideal (especially for cross-project-system things like referencing a |
I'm not aware of other consumers of that file, but if a project changed in such a way that a consuming project must be rebuilt, then that needs to be visible to the VS FUTD check. The CopyComplete marker is the current mechanism for this. Considering only Visual Studio's consumption of that file, expanding the occasions in which it's touched will trigger more builds in VS. But the problem here is that we're not building when we should, and so that sounds like the fix we want. My understanding is that a more optimal solution would be to have all depending projects model the CopyToOutputDirectory items of those projects they depend upon, taking into account any PrivateAssets logic. Absent that, simply touching the marker seems the correct behaviour to me here.
This would require deep changes to VS, as VS builds project-by-project and very little information flows between builds today, other than simple status flags. |
From chat with @rainersigwald we first need to sort out ownership (is this an msbuild or a project system bug?). He'll follow up with @drewnoakes . |
@rainersigwald @drewnoakes I didn't see any update on this. Did you get a chance to discuss and confirm the root cause? |
This issues impacts our solution of 110 projects. |
This is a duplicate of dotnet/project-system#4665. @PathogenDavid has kindly documented some workarounds. We are working on a fix for it at the moment. dotnet/project-system#7932 does fix this, but introduces some performance regressions that I'm trying to work around right now. It is expensive to have each project recurse through its references to gather items (which that PR does). That PR also won't keep the list of items up to date over time as referenced projects change, as we don't trigger design-time builds when referenced projects change. |
Per Drew's comment, closing out this issue and will track it on the project system side going forward. |
Issue Description
When incrementally building a project with a dependency to another project, content files of the latter won't update in the output directory of the former.
Steps to Reproduce
Sample
Manually
Content
,PreserveNewest
Expected Behavior
Actual Behavior
Analysis
_CopyFilesMarkedCopyLocal
does touch the CopyCompleted file._CopyFilesMarkedCopyLocal
is skipped;_CopyOutOfDateSourceItemsToOutputDirectory
does the copying then.Versions & Configurations
The text was updated successfully, but these errors were encountered: