Rider modifes back slashes to forward slashed on build

When I open a project (which is mostly developed on Windows) on my Mac and start editing Rider modifies all the backslashes to forward ones in *.props files. Seems like I need to tune up some settings but have no idea which ones. Why does this happen?

0
5 comments

Which version of Rider you are using? Rider shouldn't change the file content silently, or you should see any code inspection suggestions. Will it bring any errors on building?

 

0

I use `JetBrains Rider 2023.3.4`, no errors on building, just modifying slashes (see screenshot)

0

IDE should not apply the modifications. It seems from MSBuild.

In Settings | Build, Execution, Deployment | Toolset and Build, uncheck “Use ReSharper Build” then Rider will not optimize the build and use MSBuild directly. Or you can test with dotnet build CLI out of IDE.

Clear solution and build again. Could you see the same result? 

0

It was already unchecked. And `dotnet clean` followed by `dotnet build` leads to the same result.

0

The changes were applied by MSBuild, sometimes it will lead to a build failure in Linux. It is out of our control. The corresponding MSBuild issue is here.

You may add a build task to work around this issue, or refer to the other solutions in the MSBuild ticket.

0

Please sign in to leave a comment.