Visual Studio - Deleting .vs folder

核能气质少年 提交于 2020-12-02 04:57:56

问题


I have a 3gb .vs folder in my C++ project.

I am wondering if it is safe to delete the .vs folder.

If not what can i do to decrease the volume.

Thanks in advance.


回答1:


Find a folder called AutoPCH and delete all the files inside. :)




回答2:


The .vs folder is generated by Visual Studio and is readily re-created. Sometimes removing .vs is necessary to get a project building again, for example after a Visual Studio update, or opening the solution from a portable drive on a different computer.

However, be aware that you will lose some user state related to the solution:

  • Selected build configuration
  • Local debug settings, like startup project(s)

You will NOT lose:

  • Solution/project structure
  • Build configuration definitions
  • Project dependencies
  • Third-party extension settings etc.



回答3:


I delete the .vs folder to conserve space. Delete it OUTSIDE of Visual Studio. Then open Visual Studio and REBUILD the program. the .vs folder is recreated, and is usually smaller.




回答4:


[It Works] For me .vs folder takes almost 5GB space and a big problem when taking backup or comparing folders. This is due to visual studio "Intellisense" feature doing some covert logging to augment our sense.

This solution works for me.

Visual Studio | Tools | Options | Text Editor | C/C++ | Under "Intellisense" category set "Disable Automatic Precompiled Header" to true.




回答5:


Chiming in with my own experience.

If you are working on something that is very much location dependent (for example, OpenGL which has lot of hard coded linking and library including), then, the answer is.

No. You should not delete.

If it is not like the OpenGL situation, then,

Yes, you can delete it. visual studio will simply recreate that folder for you.

also, if I remember correctly, .vs is part of the standard .gitignore file for visual studio projects. that also hints that you can happily delete things (except for stuff like OpenGL)



来源:https://stackoverflow.com/questions/49597294/visual-studio-deleting-vs-folder

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!