ICode9

精准搜索请尝试: 精确搜索
首页?>?bet356客服邮箱> 文章详细

c – 在Visual Studio中刷新自动完成(IntelliSense)数据库

2019-09-30 10:08:42??阅读:10??来源: 互联网

标签:c?windows?visual-studio-2010?visual-studio-2008


我注意到,一旦我的项目达到一定的大小(在我的情况下~4,100行代码),Visual Studio中的自动完成功能将无法正常工作.我还注意到,一旦第三方库的数量增加(名称空间和类属性和方法不再可见),性能也会降低.

有没有办法手动更新自动完成数据库或为现有项目创建新数据库?

我目前在Visual?Studio?2008工作,但我也在Visual?Studio?2010遇到过这个问题.

解决方法:

bet356客服邮箱对于VS2015,2017和VS2019关闭Visual Studio并删除与解决方案相同的文件夹中的.vs文件夹.它包含intellisense数据库(如果我们知道哪些文件,应该可以只删除特定于intellisense的文件).请注意,如果删除整个文件夹,您将丢失窗口布局配置等.

对于以前的版本,请关闭Visual Studio并导航到项目文件夹. * .sdf文件包含intellisense数据库 – 如果删除此文件并在visual studio中重新打开项目,它将重建缓存.

删除sdf文件为我解决了问题.

Sometimes working with a big solution (mainly C++ projects) becomes
unbearably slow. To fix it you need to close the solution and go
delete the .SDF file. After that it returns to normal again, for about
a week, or so until you need to do it again.

The underlying cause is that the SDF file gets fragmented and,
according to xperf profiling I’ve done, VS will sometimes do 20,000+
random reads from it when changing between debug and release. Putting
the SDF files on an SSD fixes the problem but should not be necessary.
VS needs to use the SDF file more efficiently and not do blocking SDF
operations, ever.

资料来源:https://visualstudio.uservoice.com/forums/121579-visual-studio/suggestions/2255455-fix-the-delete-sdf-file-problem



标签:c,windows,visual-studio-2010,visual-studio-2008

专注分享技术,共同学习,共同进步。侵权联系[admin#icode9.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有