27

Since update to VS 2022 17.2.0, a new folder called "FileContentIndex" is created in "...\.vs\[soln name]".

This seems to be related to ServiceHub.IndexingService.exe. There's also a new file type of ".vsidx" and a "merges" folder.

There's not much info around at the moment. At the time of posting, StackOverflow returns no search results on the above.

I want to disable this feature. I've gone through all the Tools > Options settings but can't seem to find anything relevant. Any ideas?

Thanks

Added screenshot: VS 2022 17.2.0 Tools > Options VS 2022 17.2.0 Tools > Options

user1553309
  • 281
  • 1
  • 3
  • 8
  • For anyone interested: you can vote this bug up https://developercommunity.visualstudio.com/t/vs-folder-growing-very-large/10242198 – Leniel Maccaferri Feb 06 '23 at 14:37
  • Microsoft closed the link above as a duplicate... here's the one they're tracking: https://developercommunity.visualstudio.com/t/173-Preview-Indexing-process-fills-disk/10098622 – Leniel Maccaferri Apr 19 '23 at 22:52

4 Answers4

30

I was experiencing the same issue. I'm running Visual Studio 2022 ARM version 17.4.0 preview 4.0.

I found this work around in the Microsoft Developer Community.

Basically, rename or delete the Indexing.servicehub.service.json file from the C:\Program Files\Microsoft Visual Studio\2022\[Community,Pro,Enterprise,Preview]\Common7\IDE\CommonExtensions\Microsoft\Editor\ServiceHub folder.

You can then delete the .vs\[Solution Name]\FileContentIndex folder.

That folder was 185GB on my machine. I followed this work around and the folder has not come back.

Hope this helps.

Don Shrout
  • 865
  • 10
  • 17
  • 3
    So far this is the only working solution. But vs still trying to index the files in background tasks. I think we need to wait for the next update to completely get rid of it. – Levent Yıldız Nov 18 '22 at 13:00
  • 2
    Great solution Thanks! Iexperienced the same problem on Intel (virtualized Parallels x64 Windows 10). Unbelievable this was not picked up sooner. – Jurgenfd Dec 14 '22 at 14:37
  • 4
    Every time you install a new Preview version which usually happens every Tuesday these days, this bug comes back. You'll have to go to that folder and delete the file `Indexing.servicehub.service.json`. Microsoft is informed already: https://developercommunity.visualstudio.com/t/vs-folder-growing-very-large/10242198 – Leniel Maccaferri Feb 08 '23 at 14:39
  • 3
    This "feature" take 100% of my HDD usage in VS 17.5.1 !! Thank you for the information, save my work day. – Safirion Mar 08 '23 at 11:18
  • 1
    I am running 2022 17.5, and that JSON file doesn't exist there. Instead, I found a file `Microsoft.VisualStudio.Text.Indexing.Service.dll` - I renamed the extension so it wouldn't load it. It says it is indexing the solution, but my CPU fan is no longer running when I just launch VS and open the solution... – Jay Imerman Mar 15 '23 at 20:02
  • 1
    In fact, after installing the latest point update, it restored the DLL, and restored all my problems with VS. I changed the DLL back so it couldn't find it, and skipped the part about deleting the index folder in the .vs folder, and voila - Find in Files works now, and VS is fast again. Looks like this indexing service is not only interfering with performance, but interfering with functionality as well. – Jay Imerman Mar 16 '23 at 18:38
11

I can confirm that the option does not appear in the Preview Build of VS 2022 17.3.

My problem is that this folder is taking up a whopping 197GBs. Ridonculous!

Julian Dormon
  • 1,767
  • 4
  • 32
  • 58
2

Please check Tools > Options > Environment > Preview Features > Enable indexing for faster find experience option:

enter image description here

See also https://devblogs.microsoft.com/visualstudio/code-search-in-visual-studio-is-about-to-get-much-faster/

Sergey Vlasov
  • 26,641
  • 3
  • 64
  • 66
2

I have found that this works for me on VS 2022 17.5.4 (ARM64)

  1. Close Visual Studio

  2. Rename your project index folder:

.vs\{my-project}\FileContentIndex_renamed

Start VS 2022, again: VS 2022 will recreate the folder, and hopefully your indexing will be working again.

Before this change, using VS 2022 17.5.4 (ARM64), would be constantly indexing the project, and never completing. At the bottom left corner of VS, it would animate the Ready Background tasks icon, and if you were to hover over the icon, in my case I would see two tasks running, both indexing.

Wayne
  • 3,359
  • 3
  • 30
  • 50
  • THANK YOU! This also worked for me when I couldn't open one file in my solution. As soon as I clicked that one file a "previewing the file" modal would pop up and then I was not able to do anything until I terminated Visual Studio. Renaming `FileContentIndex` did the trick. – Arno Dverjging Aug 29 '23 at 14:08