aes
aes

Reputation: 95

Why is .vs folder so huge?

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.

Upvotes: 3

Views: 5525

Answers (1)

Nanmu Honery
Nanmu Honery

Reputation: 240

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.

Upvotes: 1

Related Questions