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

Visual Studio operates on outdated cache after git pull again #73455

Open
vsfeedback opened this issue May 13, 2024 · 1 comment
Open

Visual Studio operates on outdated cache after git pull again #73455

vsfeedback opened this issue May 13, 2024 · 1 comment
Labels
Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead

Comments

@vsfeedback
Copy link

This issue has been moved from a ticket on Developer Community.


[severity:It's more difficult to complete my work] [regression] [worked-in:a few versions ago, maybe 17.8]
This is the same issue as https://developercommunity.visualstudio.com/t/Visual-Studio-operates-on-outdated-cache/10161097 again since the same problem has come back:

When you git pull changes to files currently not opened in the editor and then run a codefix on project or solution level that will modify a file that was changed by the git pull, the codefix will undo the changes you’ve previously git pull’d.

In addition, if a file currently opened in the editor references members that are currently not open in the editor and were added in the latest git pull, those will have a red squiggly. The squiggly disappears if you open the file containing the added members.

In addition, even though the build worked fine, if you start debugging, halt at a breakpoint and then try to take a step, E&C will report errors due to changes you've supposedly made that cannot be applied.

To reproduce:

  1. Download and extract attached Repro.zip
  2. Navigate to the Checkout directory and open Repro.sln
  3. Open Program.cs in the editor and perform a build
  4. Open the git changes blade and click on pull
  5. In Program.cs, bring up the light bulb menu on the second line where it says using System.IO;
  6. Navigate to Remove Unnecessary Usings and in the preview pane, click on Fix all occurrences in: Project
  7. Accept the proposed changes.
  8. Review the changes made in the git changes blade, specifically OtherFile.cs.
  9. The unnecessary usings were removed but the comment inside the OtherFile class, // these changes will be undone after applying the codefix, that was pulled in step 4, was removed as well.

Original Comments

Feedback Bot on 5/1/2024, 09:03 PM:

(private comment, text removed)


Original Solutions

(no solutions)

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels May 13, 2024
@Suchiman
Copy link
Contributor

Here's the Repro.zip again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead
Projects
None yet
Development

No branches or pull requests

2 participants