【VS】VS各类文件做用详解

DATE: 2018.12.11


一、参考:

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

二、VS各类文件做用详解

SDF文件和ipch文件夹:less

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会用系统的临时文件夹来保存这些文件。ide

.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)visual-studio

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.ui

.idbthis

文件类型:Visual Studio Intermediate Debug Fileurl

扩展名为.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!

相关文章
相关标签/搜索