为什么Visual Studio为空项目生成这么多文件? [英] Why does Visual Studio generate so many files for an empty project?

查看:266
本文介绍了为什么Visual Studio为空项目生成这么多文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我很擅长将Visual Studio 2017用作IDE,但我注意到它与我使用的大多数其他内容有很大不同。  我仍然是一名初学程序员,我发现即使我正在编译Visual Studio必须创建的一些最基本的项目中的所有
源.cpp文件,这也是非常不寻常的。隐藏的".vs"中的许多文件夹。  对于一个简单的c ++项目,涉及两个.cpp文件和一个头文件(我写的,我是
不考虑标准头文件),创建了一个包含119 MB文件的隐藏.vs文件夹。  那是兆字节。  我可以在Dev-C ++等古老的IDE中编译同一个项目,并生成不超过一个.exe
文件。  显然,Visual Studio正在做的很多事情是多余的,我不希望我的所有项目占用这么多文件空间。   在创建和编译
基本C ++项目时,我该怎么做才能确保Visual Studio生成尽可能少的文件?

I'm very new to using Visual Studio 2017 as an IDE, but there's something that I've noticed about it that's very different from most other ones that I use.  I'm still a beginner programmer, and I find it very unusual that even when I'm compiling all of the source .cpp files in some of the most basic projects that Visual Studio has to go and create so many files in a hidden ".vs" folder.  For a simple c++ project involving two .cpp files and a single header file (that I wrote, I'm not considering the standard headers), a hidden .vs folder was created containing 119 MB of files.  That's Megabytes.  I could compile this same project in some ancient IDE like Dev-C++ and have it produce no more than than a single .exe file.  Clearly, a lot of what Visual Studio is doing is extraenous, and I don't want all of my projects to take up so much file space.  What can I do to make sure that Visual Studio produces as few files as possible when creating and compiling basic C++ projects?

推荐答案

嗨John,

欢迎来到MSDN论坛。

Welcome to MSDN forum.


到目前为止,我们已经移动了.SUO文件和VB / C#编译器IntelliSense数据库文件到新位置。所有新的项目特定的机器本地文件也将添加到新位置。我们计划在将来的版本中更进一步,并且是b $ b调查如何改进构建输出的目录结构以及可能使源树混乱的其他现有文件。

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.

因此,.vs文件夹中的文件应该从构建生成或包含特定于机器的信息。此文件夹的大小不应该太大。我们很难确定它是否与VS IDE,项目本身或其他相关,
我没有直接解决此问题,但我可以为您提供一些疑难解答:

So the files in the .vs folder should be generated from a build or contain machine-specific information. The size of this folder should not large. It is hard for us to make sure that whether it is related to the VS IDE, the project itself or others, I have no direct solution for this issue, but I could provide you some troubleshoots to you:

1。创建一个新的C ++项目,检查.vs文件夹的大小,然后编译项目,再次检查文件夹大小,确保大多数文件是否是从构建生成的。

1. Create a new C++ project, check the size of .vs folder, then compile the project, check the folder size again, make sure whether most of the files are generated from build.

2 。删除.vs文件夹,然后重建您的C ++项目,应重新创建.vs文件夹。检查.vs文件夹大小。

2. Delete the .vs folder, then rebuild your C++ project, the .vs folder should be re-create. Check the .vs folder size.

3。如果上面没有帮助,请检查.vs文件夹中的文件,找出哪个文件很大,或者您可以向我们分享关于该文件夹中文件的截图

3. If above not help you, please check the files in the .vs folder, find out which file is large or you can share us a screenshot to us about the file in that folder

4。尝试将Visual Studio 2017更新到最新版本。

4. Try to update you Visual Studio 2017 to the latest version.

希望这可以帮助您。


这篇关于为什么Visual Studio为空项目生成这么多文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆