9

The question is about Rider, but I hope this setting is similar for all Jet Brain's Ides.

I have several folders with js and css bundles. For example the folders are situated in wwwroot/buildjs and wwwroot/buildcss.

The problem is when I press Ctrl + Shift + F to find something in the solution or (that is worse) when I try to rename something with the help of refactoring instruments (Right click -> Refactor -> Rename) Rider tries to rename in the bundles too! It's very slow, and I don't need it! Could somebody tell me ho to exclude this folders?

I remember early I could do it with the help of Right click on the folder -> Tools (not sure but maybe) -> Exclude from index. But now I don't see this menu item.

LazyOne
  • 158,824
  • 45
  • 388
  • 391
Aleksej_Shherbak
  • 2,757
  • 5
  • 34
  • 71
  • 3
    **Cannot say about Rider (not using it)** but in other IDEA-based IDEs that would normally be `Mark Folder As... | Excluded` via context menu in Project View panel (or via `Settings/Preferences | Directories` .. which will be different for each IDE -- that one is for PhpStorm/WebStorm that have more simple project structure; in IntelliJ IDEA it will have another item in the settings path -- https://www.jetbrains.com/help/idea/content-roots.html#folder-categories). – LazyOne Feb 05 '21 at 08:56
  • Are these folders included in .net project? – xtmq Feb 05 '21 at 09:37
  • @xtmq yes I suppose. When I remove one of these folder I see changes in git. The changes are about `.csproj` file. Is that what you mean? – Aleksej_Shherbak Feb 05 '21 at 09:59
  • Probably you see `exclude` changes in the project file? For now Rider indexes all files which are part of msbuild project – xtmq Feb 05 '21 at 16:50
  • 1
    Anyway I suggest you to wait a bit. In 1 or 2 weeks we publish a new Rider 2021.1 EAP 3 build, you can try. I have rewritten files indexing there completely. Probably it would fix your case – xtmq Feb 05 '21 at 16:54
  • @xtmq I have installed rider 2021 beta. And there is no exclude file from index feature( – Aleksej_Shherbak Apr 05 '21 at 13:49
  • Are you trying to exclude something which is belong to .NET project? – xtmq Apr 06 '21 at 16:04
  • 1
    @xtmq I'm trying to exclude a big folder with JavaScript and CSS bundles that is situated in `wwwroot`. Is it possible? – Aleksej_Shherbak Apr 27 '21 at 14:33
  • Is this folder included in an msbuild project? in csproj file? If yes, no it is not possible for now, feel free to track this issue: https://youtrack.jetbrains.com/issue/RIDER-24072 – xtmq Apr 27 '21 at 21:41

1 Answers1

10

The workaround that solved it for me was to:

  • right click the folder > Tools > Stop Index

This will not index the folder and so it won't appear on search results. I did this for each folder I have on the project.

I think this is an open bug: https://youtrack.jetbrains.com/issue/RIDER-2173

Vetras
  • 1,609
  • 22
  • 40