Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Should I add the Visual Studio 2015 .vs folder to source control?

Visual Studio 2015 creates a new folder called ".vs". What is the purpose of it and should I add it to source control?

like image 371
SoftwareFactor Avatar asked Aug 07 '15 13:08

SoftwareFactor


People also ask

Do you need .VS folder?

Usually, . vs folder is required by Visual Studio to store opened documents, breakpoints, and other information about state of your solution. which means It contains typical files like, Temporary caches used by Roslyn for IntelliSense.

What happens if I delete .VS folder?

When you delete the vs folder, you may lose user state related to solutions such as build configurations, local debug settings, open tabs, Project Configuration such as Profile type, Launch type , and so on. But deleting the . vs folder will not create any impact on: Solutions and projects.

Should I include .VS in git?

Yes, you can add . vs folder to . gitignore - in fact you should do this on the beginning.

What does add to source control mean in Visual Studio?

Add to source control option for New Project Dialog can be done from Options Dialogs. You can create a new Git repository at the same time we create the new project. In fact, not only Repository, you can also add the source code for Team Services as well.


1 Answers

No, you should not add it to source control. The purpose of this folder is to move machine- and user-specific files to a central location. The explanation on the Visual Studio User Voice issue explains it well:

So far, we have moved the .SUO file and the VB/C# compiler IntelliSense database files to the new location. All new project specific, machine local files will be added to the new location too. We plan on taking this even further in future releases and are investigating how to improve the directory structure of build output and other existing files that can clutter the source tree.

These are all files that you would never check in, since they are generated from a build or contain machine-specific information.

like image 189
Patrick Quirk Avatar answered Oct 19 '22 10:10

Patrick Quirk