2

I have a project that is <20 MB but the .vs folder seems to be growing without bound. It's over 18 GB now.

Specifically, the .vs\[SolutionName]\FileContentIndex\merges folder.

Previously, Windows showed that the "Size on Disk" was much bigger than the size (2x or 3x).

I'm aware that I can just delete the .vs folder, and I have been doing so repeatedly. I don't really mind it. I am running a preview version of Visual Studio on ARM, so I should probably submit a bug report to MS. But I was just curious about the structure of the .vs folder and if anyone else has encountered this issue before.

VS 2022 Community Preview, 17.4.0 Preview 1.0. ASP.NET Core multi-project sln. Surface Pro X, SQ1, 8 GB, 128 GB.

Frant
  • 5,382
  • 1
  • 16
  • 22
aes
  • 55
  • 1
  • 7
  • 2
    Does this answer your question? [Visual Studio - Deleting .vs folder](https://stackoverflow.com/questions/49597294/visual-studio-deleting-vs-folder) – Mohammad Aghazadeh Sep 04 '22 at 03:58
  • https://developercommunity.visualstudio.com/t/173-Preview-Indexing-process-fills-disk/10098622 – Hans Passant Sep 04 '22 at 15:16
  • @HansPassant This is very similar to what I am experiencing. I will try the workaround posted next time it happens. Thank you! – aes Sep 08 '22 at 04:03
  • 1
    I am also experiencing it. The `merges` folder is empty for the same project on another intel machine running a stable VS version, so I assume it's either VS on Arm bug, or general VS 17.4 Preview bug. – Ivica M. Sep 22 '22 at 13:51
  • 1
    I'm using VS 2022 17.3.6 and I had over 50,000 files in the merges folder for one project (which does have over 400,000 lines of code). I gather that FileContentIndex is to do with indexing your project for faster searching, but those "merges" files seem like they might be temp files that aren't getting cleaned up. So whatever it is, it made it out in a 17.3 version. – alfvaen Oct 18 '22 at 18:45
  • I kept running out of space and .vs is the culprit - busy deleting now and it is over 200GB - ??? a bit of a joke really. – Duncan Groenewald Jun 16 '23 at 01:27

1 Answers1

2

The .vs directory is used to store the working configuration of the current user in the solution, including the window layout before VS is closed, opened tabs/operation records/file documents, some custom configurations/development environment, debugging breakpoints, etc. Such setting information and status.

The .vs file itself is temporary, and VS will be automatically regenerated after being deleted, which will not affect the startup and operation of the solution. But after deletion, the local debug settings and the selected build configuration will be lost。

Taking the ASP.NET MVC project as an example of VS2017, you can view the .vs structure. There are only two folders. The config file saves the applicationhost.config file, which is actually the configuration file of IIS Express.

The other is named according to the name of the current project solution, which are the .suo file and a sqlite3 folder, where the .suo file records information such as breakpoints and bookmarks set by the user in the current solution.

Lei Zhang-MSFT
  • 280
  • 1
  • 5
  • 2
    Yeah but the .vs/FileContentIndex folder shouldn't be a whopping 75gb, eating up all of my disk space! – Justin Mar 24 '23 at 02:29