Search scope doesn't appear to be working?

I'm missing files that i think should be there because of the scope i defined:

as you can see i included ./package.json but when i search for the file with my scope i get nothing:

can't find any of the `.eslintrc` files i added either

0
5 comments

ncage, may I know if you are creating new scope outside a Solution or C# project? (For example, create scope in a pure frontend project, where Rider open the folder directly but not open by loading the .sln or .csproj )

There is a known issue of creating scope that out of a solution/csproj in Rider. 

RIDER-46978 "Appearance & Behaviour > Scopes" doesn't work

You could try to load the project as a csproj and create scopes again. 

0

Tao Sun Its a solution i'm opening & it contains both items that are directly referenced and items that aren't directly reference in the project/solution files. It contains both .net code & our front end code (that is not .net). For example ./package.json its not directly referenced and that is what it is unable to locate (i think there is other things but thats what I immediately noticed). 

0

ncage When creating scopes in Rider, it will be based on your project files (defined in csproj/sln), so I'm wondering if your frontend project is visible in Solution Explorer as well? (Not in File Explorer)

If so, you should see scopes are created with relative path of project file, as the screenshot below.

0

Tao Sun sorry for taking forever to respond. I guess like everyone else i always have 1000 things going on at once. So yes the files i was referring to wasn't in the csproj files or sln file. I finally did figure it out though. Here is a screenshot:

 

 

See how a lot of those files have “no index”? That is why. After i right clicked on the file in “File Sytem” & right clicked “tools→start index ” it started working. I didn't have to add those files to the search scope i just had to add them to the index. So I have a better understanding of everything

  1. Did those files not get indexed because they weren't directly referenced by the project/solution?
  2. Is there a quicker way than to right click on every file and add them to the index directly? I would think adding them to scope would automatically index them.
  3. Is there anyway to index just file names & not conent?
0

ncage The .sln/.csproj should include all references used in your project, no exceptions. You can switch the view in Solution Explorer, click “Solution” and switch to “File System”, right-click on the target folders or files, select “Include” to add them in your solution.

You could use Scope to manage the search target, but still need to add them into your solution/project first.

0

Please sign in to leave a comment.