How do I add a C# solution file in JetBrains Rider?
Asked Answered
S

2

10

In Rider, if I open a folder that has a single .csproj file in it, how do I add a solution? Is there a way to do it inside Rider, like there is in Visual Studio, without resorting to the command line and closing/re-opening?

Sather answered 13/12, 2018 at 19:49 Comment(0)
S
9

Looks like you can do this with Rider 2019.1 now.

Go to File -> New -> gives the option to add a new solution.

Sather answered 30/4, 2019 at 17:3 Comment(0)
W
2

AFAIK there's no way in Rider to toggle between folder mode and solution mode like you can do in Visual Studio.

The rest depends on what your intention is.

If you opened a folder containing a .csproj with File | Open File or Folder and you realized you were unable to build, debug or run your .NET application in this mode, you should just re-open it with File | Open Solution or Project, pointing Rider to the .csproj file.

If the above is not an issue but you want to take your existing .csproj project and wrap it into a .sln file, then select File | New Solution | Empty Solution, and when the new solution loads, add your existing project to it by right-clicking the solution node in Solution Explorer and selecting Add Existing Project.

Wellstacked answered 15/12, 2018 at 20:11 Comment(1)
I think you can switch between Folder (called FileSystem in Rider 2018.2) and Solution at the top of the solution explorer. I guess I will have to do as you suggest and manually add a solution file and then add the project to it. Thanks for the reply:)Sather

© 2022 - 2024 — McMap. All rights reserved.