Locating the Rider installation programatically

I've been looking into starting rider from a tool that I'm working on, but I don't seem to find a way to locate the installation.

What I need is to be able to locate the installation regardless of version or if the user has specified a custom location for the installation. And all this without the user having to point out where it's installed or opening the tool prior. It also needs to support both installations through the toolbox and standalone.

I'm specifically interested in users on Windows, so if there's a solution that only works on there, that's not a problem.

Is there a way to be able to locate the installation regardless of where it is? Or perhaps there's a list of known locations that Rider is being installed to up to this point, if the user does not relocate the installation?

 Thanks!

0
4 comments

Hi FBjorklund

Rider default location could be different and depends on your OS type and bit rate and the way you install the IDE. 

If you use .Net Ultimate or Rider Standalone installer, the following directory is used by default:
%LOCALAPPDATA%\JetBrains\Installations

If you have installed JetBrains .NET products for all users, the installation directory is:
%\PROGRAMFILES(x86)%\JetBrains\Installations for 64-bit systems and
%PROGRAMFILES%\JetBrains\Installations for 32-bit systems. 
 If you install Rider via ToolBox, the default location is slightly different

  • Windows: %LocalAppData%\Programs
  • macOS: ~/Applications
  • Linux: ~/.local/share/JetBrains/Toolbox/apps

Here you can also find a list of directories used by Rider to store settings, caches, logs, and so on. 

All these locations are used by default. They could be changed by the user, but this is not common case. I'm not sure it is possible to detect that any location has been changed without launching Rider. 

I hope this helps! Please, give us some more details about your case so we can try to find a workaround for you. 

Thanks! 

0

Hi Alexandra! Thanks for the detailed response.

Our use case is that we have a tool from which we would like to launch Rider. We noticed that we have users with quite varying install locations, whether that's due to their install being old, and the location has since moved, or they specifically chose another install location. Optimally we would have something similar to vswhere that can locate a Visual Studio installation.

I do recognize some of the locations that you mentioned, and so I would think that most user's should be covered if we were to use these. The only other location that I've seen is "%PROGRAMFILES%/JetBrains/JetBrains Rider 2023.2.1/...", for a user who stated they had not moved their install. This was with a standalone install of just Rider.

Thanks again!

0

Hello Ivan!

Yes that looks like it's what I was looking for. Gave it a try and it indeed gives me the path I expect. Will do some more testing using that, seeing how it works.

Thanks for the help!

0

Please sign in to leave a comment.