Refreshing the auto complete (IntelliSense) database in Visual Studio

For VS2015, 2017 and VS2019 close Visual Studio and delete the .vs folder in the same folder as the solution. It contains among other things the intellisense database (it should be possible to delete only the files specific to intellisense, if we knew which ones). Note that if you delete the whole folder you will lose your window layout configurations etc.

For previous versions, close Visual Studio and navigate to your project folder. The *.sdf file there contains the intellisense database- if you delete this files and reopen your project in visual studio, it rebuilds the cache.

Deleting the sdf file solved the problem for me.

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.

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

Leave a Comment