【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!

相關文章
相關標籤/搜索