Working directory when starting a C# program is set differently in 2025.2

Hi,

Since upgrading to 2025.2, when I start my C# program from Rider (either attaching or just running) the working directory is auto-set to the project's root.

Testing the same project with version 2025.1.6, I can see the working directory is project-root/bin/platform/configuration (e.g. project-root/bin/x64/debug), as it's always been.

How do I get this behavior with version 2025.2?

The profile used to launch does not specify any working directory, and the project's RunWorkingDirectory property is unset. I even compared both versions' configurations, and nothing stands out.

2
3 comments

Can confirm, breaks a lot in our project

0

Hello,

Unfortunately, you encountered this known issue: RIDER-128989 Environment.CurrentDirectory points to project folder rather than OutDir

We are working on a fix. Meantime, you can try this workaround: override the “workingDirectory” in LaunchSettings.json:

  "profiles": {
    "profileName": {
      "commandName": "Project",
      "workingDirectory": "$(OutDir)",
// or "workingDirectory": "./bin/Debug/net9.0",

If that doesn't help, please tell me.

Have a nice day!

0

Thanks you for your answer, I'll follow the issue's resolution.  

In the meantime I can work with version 2025.1.

0

Please sign in to leave a comment.