Qter 发表于 2023-10-29 12:53:18

VS各种文件作用详解

参考:http://blog.51cto.com/nster/1184821
https://blog.csdn.net/afanaily/article/details/41247899VS各种文件作用详解1、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会用系统的临时文件夹来保存这些文件。2、.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.3、.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…idb3、.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).tlog文件对于确保正确的增量构建是必要的;它们包含的数据告诉构建系统在构建过程发生时访问了哪些文件——这样我们就可以非常可靠地知道这些文件是否更改了,如果更改了,那么需要重新构建哪些文件。这些文件应该只进入中间输出目录—我们不应该将它们复制到最终输出目录(除非您将中间输出目录设置为与最终输出目录相同的目录,这实际上并不受支持)。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.至于ipch文件,即使在构建完成之后也确实需要它们。通过在智能感知请求期间加载这些预编译文件,我们使用这个文件来优化智能感知性能。除非预编译选项更改,否则没有理由重新构建这些文件。4、.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文件。5、.ink文件Incremental Linking,增量编译的意思。取消增量编译可以不生成这个文件,但是对于大工程来说,会慢一些。.manifest文件
清单文件
https://blog.csdn.net/qq_34754747/article/details/110851104

Qter 发表于 2023-10-29 13:10:17

.APS : 存放二进制资源的中间文件, VC 把当前资源文件转换成二进制格式, 并存放在 APS 文件中,以加快资源装载速度。

Qter 发表于 2023-10-29 13:11:07

通常,VS在建立一个工程之后,会出现*.clw *.ncb *.opt *.aps为后缀的文件

.CLW 文件是VC Class Wizard信息文件。存放了Class Wizard的信息。
.NCB 文件是分析器信息文件,是由系统自动产生的。
.OPT 文件是IDE的Option文件。
.APS 文件是资源文件的二进制版本。

还有其他的几个
.bsc 浏览器信息文件
.dsp 项目文件
.dsw 工作空间文件
.mak 外部的创建文件
.plg 建立日志文件

Qter 发表于 2023-10-29 13:13:07

.exe :可执行文件,点击即可运行
.ilk :当选定渐增型编译链接时,连接器自动生成ILK文件,记录链接信息
.obj :目标文件,obj文件与cpp文件名字一一对应
.pch :prcompiled-header,预编译头文件
.idb :文件保存的信息,使编译器在重新编译的时候只重新编译改动过的函数和最新类定义改动过的源文件,这样可提高变异速度
.pdb :Program Database,即程序数据库文件,用来记录调试信息
.dsp :Developer Studio Project,配置文件
.ncb :No Compile Browser,其中存放了供ClassView、WizardBar和Component Gallery使用的信息,由VC开发环境自动生成
.plg :超文本文件,可以用IE打开,记录build的过程
.cpp :C++源文件
页: [1]
查看完整版本: VS各种文件作用详解