【VS】VS各种文件作用详解

DATE: 2018.12.11


1、参考:

http://blog.51cto.com/nster/1184821
https://blog.csdn.net/afanaily/article/details/41247899

2、VS各种文件作用详解

SDF文件和ipch文件夹:

visual studio 2010 中新建一个项目会同时建立一个ipch目录与sdf文件,即使你删掉它,再次打开工程时还是会重新建立。动辄30、50M的容量让我们心里很不爽。其实这是2010的一个新功能,与智能提示,错误提示,代码恢复、团队本地仓库等等息息相关的东西。如果大家觉得很不爽可以关掉它。Tools —— Options —— Text Editor —— C/C++ —— Advanced ——Disable Database 设置为True,默认为false。这样,你关闭visual后删掉工程目录下的ipch与sdf就不会再产生了。如果想把这些文件保存到特定的文件夹,就要设置一下Fallback Location,否则Visual Studio会用系统的临时文件夹来保存这些文件。

.sln 和 .suo都是是解决方案文件

.sln(Visual Studio.Solution):它通过为环境提供对项目、项目项和解决方案项在磁盘上位置的引用,可将它们组织到解决方案中。
包含了较为通用的信息,包括解决方案所包含项目的列表,解决方案内任何项的位置以及解决方案的生成配置。
比如是生成Debug模式,还是Release模式,是通用CPU还是专用的等。
此文件存储在父项目目录中,他是一个或多个.proj(项目)的集合。

.suo(Solution User Opertion):解决方案用户选项记录所有将与解决方案建立关联的选项,以便在每次打开时,它都包含您所做的自定义设置。
比如VS布局,项目最后编译的而又没有关掉的文件(下次打开时用)。

.vcxproj.filters (http://blogs.msdn.com/b/vcblog/archive/2010/03/02/visual-studio-2010-c-project-upgrade-guide.aspx)

The display of the folders and files in solution explorer is controlled by .vcxproj.filters file in VS2010. If you have folders with the same name but under different scopes, for example, “Native\Include” and “Include”, the second “Include” and the files under “Include” will not show up in solution explorer after conversion. To work around the issue, you can recreate the folder in the solution explorer and add the respective files into this folder.

.idb

文件类型:Visual Studio Intermediate Debug File

扩展名为.idb的文件是一个开发文件。

文件说明:

Intermediate file created by a Visual Studio program, such as Visual C++, during the debugging process; saves the compilers state and is used for minimal program rebuilds and incremental compilations…idb

.tlog

The .tlog files are necessary in order to ensure a proper incremental build; they contain data which tells the build system which files were accessed while the build process was taking place – that way we can very reliably tell whether any of those files changed, and if so, then what needs to be rebuilt. These files should only be going into the Intermediate Output Directory – we should not be copying them to the final output directory (unless you set Intermediate Output Directory the same as Final Output Directory, which is not really supported).

As for ipch files, they are indeed needed even after build is complete. We use this file to optimize intellisense performance by loading these precompiled files during intellisense requests. There’s no reason to rebuild these files unless precompiled options change.

.exp文件(只有DLL工程才有)

exp文件就是导出文件(export file)。在前面的讨论中,我们讨论了使用linker去创建dll(中间还有它的导出库)现在,我们假设我们生成两个dll(or just executables)。但是他们都需要调用一些对方中函数,问题出现了。当我们生成a.dll的时候我们需要b.lib;但是b.lib在对应的b.dll生成之前没有生成,而b.dll的生成又需要a.lib。正因如此,微软的解决办法是使用exp文件,或者叫导出文件。在生成两个dll之前,你使用lib.exe(library mangager tool库管理工具)来创建一个.lib和.exp,即,DLL A 的a.lib 和a.exp,现在linker使用a.lib和DLL B 自己的东西去生成b.dll和b.lib。当你回来链接DLL A的时候你就有了b.lib。这里linker需要知道a.dll中需要导出处啥。这些信息都被缓存到了a.exp文件中。linker不需要def文件或者/EXPORT选项,它仅仅是加载a.exp中的信息。a.exp就像a.dll的两个生成过程(lib.exe and linker)的联系者一样。相似的,linker不会再次生成a.lib。总的来说,这种循环调用的情况不会和在我们的程序中出现,因此,希望你不会再你的程序中用到exp文件。

.ink文件

Incremental Linking,增量编译的意思。取消增量编译可以不生成这个文件,但是对于大工程来说,会慢一些。

.manifest文件
清单文件

后续待补充。。。。


THE END!

posted @ 2018-12-11 23:33  SoaringLee_fighting  阅读(2374)  评论(0编辑  收藏  举报