Visual Studio 2022 seems to be persistently restoring a deleted project

C# Note 0 Reputation points
2025-01-14T08:04:20.32+00:00

A long time ago, I downloaded a folder containing some app for some project and then essentially messed around with it in Visual Studio for a while before deleting it since I didn't need it any more. However, for the many months that followed until now, I kept noticing that the folder for the project kept reappearing in my File Explorer no matter how many times I've tried to delete it (which has ranged from moving it to the Recycle Bin to using shredding apps). It doesn't contain all of the files that was originally in it; rather, it's an empty directory tree that contains quite a few directories like System.Linq but no files. In other words, it's a literal ghost shell of its former self.

After a while, I noticed that it only reappears whenever I'm using Visual Studio, which makes sense since I had originally opened it in VS, although it only returns randomly while I'm using VS rather than when I do a specific action in VS (as far as I know). I'm guessing that VS has some sort of recovery feature that semi-recovers the project even when I'm working on other projects. That said, I've searched and read up on some AutoRecover feature, but it says that backups are stored in %LocalAppData%\Microsoft\VisualStudio\BackupFiles yet there aren't any folders in there that seem to be related to that specific project.

Is there anything else I could check that might stop this?

Developer technologies | Visual Studio | Other
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Tianyu Sun-MSFT 34,441 Reputation points Microsoft External Staff
    2025-01-15T06:52:23.1333333+00:00

    Hello @C# Note,

    Welcome to Microsoft Q&A forum.

    You can check following aspects:

    1. Extensions. Try to disable the installed extensions temporarily. See if the directory is created by the extensions.
    2. Reset VS settings. In case some settings about the paths/directories were wrongly configured in VS 2022, try to reset VS settings by opening "Developer Command Prompt for VS 2022" and running devenv /ResetSettings command.
    3. Check the specific project(s). Can you confirm that when you tried to open and use those deleted projects/apps in Visual Studio 2022 before, they didn’t install anything to VS(like extension), and didn’t change any settings in VS?
    4. Did you set any global settings for those projects like system environment variables(especially the Path variable)? You can search and open "Edit the system environment variables" in Windows Search box => click Environment Variables option => select one of the variables, click Edit to check it.
    5. Are there some hidden files in that directory, maybe "guide" VS to create some folders? You can try to remove the complete directory if it’s possible. Or you can open a Windows File Explorer, click View, Show, check the Hidden items options. Navigate to that directory/sub-directory, confirm that no hidden files/folders exist.
    6. Try to download and use Process Monitor tool. Monitor to see which process creates the directory and when the directory was created.
    7. Are you using any version control tools? Did you set any corresponding settings?
    8. Try to update VS 2022. Version 17.12.4 has been released these days.
    9. Try to reinstall VS 2022.

    Feel free to let us know the results.

    Best Regards,

    Tianyu


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  2. C# Note 0 Reputation points
    2025-01-21T10:34:20.1733333+00:00

    I might have finally solved it; apparently the project directory was set as some "Symbol cache directory" in VS' Debugging settings. I don't know what symbol caching is or how it got set to that, but I'll monitor and see if this permanently fixes it.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.