VS_MFC: Compressed file storage space

When using VS2010 to build a C++ solution, SolutionName.sdf and a folder called ipch will be generated. These two files plus *.pch and other files make the project very large, and a simple program will occupy dozens of M It is a pity that the hard disk is not cheap enough to be free after all.

So, how to solve it? You can actually turn it off. method:

Tools->Options->Text Editor->C/C++->Advanced->Disable Database, set to True

However, this method will cause other problems, which may cause some other functions to be unavailable. Another solution is:

Tools->Options->Text Editor->C/C++->Advanced, in the property group of Fallback Location, set "Always Use Fallback Location" to true, set "Do Not Warn If Fallback Location Used" to true, Then delete the sdf file and ipch directory in the solution directory, open the solution again, and find that these annoying things are gone.

So where are those files placed? See the description of the "Fallback Location" property: this is the second location where the browsing information database and IntelliSense files are stored. If not specified, it will be placed in the temporary directory; when you go to the temporary directory, there is a VC++ directory, all in that directory. Inside.

You can set a fixed path to store these files in the "Fallback Location" property, such as D:\VS2010Temp, which is also better to manage these huge and bloated files, and you can clean them up regularly to free up hard disk space!

 

       When I went to work yesterday, I suddenly encountered a very strange problem. After I clipped a project directory to another directory, when I opened the project again with VS 2010, the "go to definition" in the right-click menu did not work correctly. For example, in a place where the function getExtensionMode is used, press the shortcut key F12, and the following Message Box will pop up:

But obviously the definition of that function is in that source file. The same problem also occurs in other files of the same solution, which makes it inconvenient to view the code and seriously affects work efficiency.

After searching on the Internet, I finally found the reason for the above situation. The ipch folder and .sdf file in the project directory cannot work properly. Solution: Close the open project, then delete all files and all .sdf files in the ipch directory under the project directory, then reopen the project with VS 2010, and let VS 2010 regenerate those files, so that you can use the F12 shortcut key .

In fact, ipch and sdf are places used by Visual Studio 2010 to save precompiled header files and Intellisense information respectively. They have no effect on the function of the project itself, but are only used to speed up compilation and facilitate code prompts. However, this part of the file usually occupies a relatively large disk space, so this part of the file can be deleted first when copying or transferring the project.

There is a way to make this part of auxiliary files not included in the project directory, reducing the disk space occupied by the project, but at the same time taking advantage of the convenience brought by these files, that is, by setting them all into a separate one. in the fallback location of the project directory. Enter the following settings in Visual Studio 2010: Go to "Tools > Options", select "Text Editor > C/C++ > Advanced", and then find "Fallback Location". Then set "Always use Fallback Location" and "Do Not Warn if Fallback Location" to "True", and set the path to place this type of file in "Fallback Location", as shown below:

这样所有工程项目的预编译文件和code Intellisense信息就都放在c:\vs 2010 Intellisense\文件夹下了。

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325984597&siteId=291194637