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?
Please sign in to leave a comment.
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?
I use `JetBrains Rider 2023.3.4`, no errors on building, just modifying slashes (see screenshot)
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?
It was already unchecked. And `dotnet clean` followed by `dotnet build` leads to the same result.
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.