What is the difference between.sln and .uproject suffixes?

When I use.uproject to open the UE project and hit Run or Debug the UE editor interface will appear.

However, my problem is that when I click on a variable or attribute in the project (which requires C++ editing), Unreal Editor will automatically open a rider version of the.sln project for me. Then I would get 2 riders, one is a rider of sln project, and the other is a uproject project, which is not what I wanted.

For example: in the UI Editor interface, a UUserWidget-> Click the Parent Class -> pops up the rider version of the.sln project

So here's my question:

1. How can I solve the above problem?

2. What is the difference between sln and uproject? Which one is better to use?

0
5 comments

Hello,

Thank you for contacting Rider support.

As you know, Visual Studio project files can always be generated from .uproject (using the context menu → Generate Visual Studio project files). Also, it is common practice not to submit these generated .sln/.vcxproj files to VCS.

Rider natively supports the Unreal project model, so it is not necessary for Rider to have Visual Studio project files generated. 

There are the key points of using .uproject against .sln:

  • You can skip the "Generate Visual Studio project files" step;
  • Project structure is presented slightly differently in the solution explorer. It represents the structure in an unreal-native way;
  • Rider directly invokes UnrealBuildTool instead of MSBuild Tasks;

The problem you experience is caused by mismatching of the Source Code Editor (Rider or Rider uproject) set in Unreal Editor Preferences and the approach you use to open a project in Rider (.sln or .uproject). When you invoke an action in Unreal Editor which requires opening a source code editor, it opens the project in the chosen way (Rider → opens .sln in Rider, Rider uproject → opens .uproject in Rider). So that, if you have a project opened in Rider through a different approach, a second Rider window would open.

To solve the problem, decide what approach you want to use, set it in Unreal Editor Preferences and open your project in Rider using a proper project file.

Hope that helps.

Have a nice day!

0

Thanks for your reply, my setting is already rider, but the sln version of rider will still pop up.

0

When Source Code Editor is set to Rider, Unreal Editor opens .sln version of a project in Rider. 

As I understand, your current situation is:

  • You have your Unreal project opened in Rider through the .uproject;
  • Source Code Editor is set to Rider. So, when you navigate to the code from Unreal Editor, it opens an .sln project in Rider; 

To solve this issue now, you need to change one of the above two things. There are the available options:

  • Either start opening your Unreal project in Rider through the .sln (instead of .uproject);
  • Nor switch Source Code Editor to Rider uproject;

Please let me know if that doesn't help.

Have a nice day!

0

Thank you very much. I have solved the problem according to item 2. 

0
Hello Rainbowsmilebb,

I am glad to hear that I was able to help.
Should you have any other questions or difficulties in the future, do not hesitate to contact support.

Have a nice day!
0

Please sign in to leave a comment.