How to index and get IDE/Resharper support in a single new file?

If I create a file on my local file system (Windows 10), Rider sees the new file in File System bar. I can edit the file, it asks me to add it to my source control, fun stuff.

What it does not do is index this new file. It says "no index". So I right click, go to Tools -> Start Index. Great, now it's "indexed". But - where's the IDE support? Where's the code suggestions and code coloring in the IDE? How do I make it start doing that in the file? How do I get it to behave like any other file already in the IDE? It's just like modifying a white plaintext file even though all my other cpp and h files are recognized? What's the magic button I have to press next or hot key combination needing 5 fingers? Please advise.

I tried googling and the best solution I found, for IntelliJ users apparently, is to press File -> Invalidate Caches. For *EVERYTHING*

0
3 comments

Hi Chris!

You need to open a project first (not a folder) so your File System bar by default is on the Solution explorer.  Here you can add a new file from a context menu of a project/folder. 

So could you please add some more details about your case? What kind of project do you have opened, and what file type do you create? Do you create it in IDE or through Windows? Could you please add some screenshots of your Rider workspace? 

Thanks! 

0

I have to do this for each file individually? Does it matter which "project folder" you do it in, do I have to manually browse each of these too?

I have a UE5 project. I create cpp and h files by hand. Or if I'm unshelving source control files from perforce, the files appear locally but the IDE needs to be manually informed of their existence

0

Hello Chris,

On Windows, Rider allows you to open an Unreal game project via VS solution file (.sln) or .Unreal project file (.uproject). Depending on it, Rider works with a game project and its files in different ways.

When you add any files to a project externally(outside the IDE or UE editor) and working with a project through the .sln, you should re-generate Visual Studio project files to get it to reflect the changes and include the newly added files to a project model in vcxproj file. This behavior is the same in Visual Studio. You can re-generate Visual Studio project files by right-clicking on .uproject file in windows explorer and selecting Generate Visual Studio project files. In Rider, there is the Refresh Solution button on the toolbar (see the screenshot) that does the same.

When you work with your project in Rider by opening it through the .uproject file, you do not need to generate VS project files, and can avoid this inconvenient step. Rider should reflect the changes when you focus its window.

Hope it helps.

Would you mind describing your use case in more detail? Why do you create C++ files externally but do not use Rider for that?
Thank you in advance and have a nice day!

0

Please sign in to leave a comment.