Get all projects in an open solution in Rider


I am building a plugin for .net solutions in Rider.


In Jetbrains Rider, a given .net Solution can have multiple projects inside it. I want to get all the projects available in the currently opened solution. How will I be able to get the available projects?


The use of


will always result in the giving an array with only the open solution.

Official comment

This is where terminology causes issues :) A "project" in the frontend IntelliJ part of a plugin refers to the IntelliJ concept of a project, which is more similar to a .net solution. You can take a look at 


and various other WorkspaceModel methods and extension functions. This will return the workspace model entity, and more details can be retrieved from the associated descriptor (which might need down casting).

I have a solution here where I read the solution to get the projects as such

fun getProjectsInSolution(project: Project): List<String> {
return try {
val solutionDirectoryVirtualFile = LocalFileSystem.getInstance().findFileByPath(project.basePath!!)!!
val solutionVirtualFile = solutionDirectoryVirtualFile.children.first {".sln") }
val solutionContent = LoadTextUtil.loadText(solutionVirtualFile).toString()
val projectsDetail = StringUtils.substringsBetween(solutionContent, "Project", "EndProject") {
StringUtils.substringBetween(it, "= \"", "\"")
} catch (ex: Exception) {

If there is any other way to getting the info I need please let me know. I'll just leave this code here in case someone needs it.


Matt Ellis



give me what the IDE considers projects identified inside the loaded project (solution)?


Please sign in to leave a comment.