Relative Content

Tag Archive for c#configurationproject

C# issue with legacy project Application.Executable path return a path with mix forward and backward slash

On VS2022, I open a solution that I downloaded from codeproject
This solution used to be in .net framework 4.6.1 ; when I open it in VS2022 it was migrated to .net framework 4.8
Not sure above information are relevant.
But when I try to start it (Project Win Form), I got issue because Application.ExecutablePath return an inconsistent string with back and forward slash.
C:HOMEWARECodeC#/BrainTeaser2/Demo/bin/Debug/Demo.exe
Later, I have an external library which use this Property as follow Application.ExecutablePath.LeftOfRightmostOf("\")
So it gets the wrong path.