Directory.GetCurrentDirectory() not working on linux?
问题 So I'm trying to create an application that requires the reading of scripts in a sub-folder called "scripts". My code I'm having issues with: string script = Console.ReadLine(); string path = Directory.GetCurrentDirectory(); string sciptpath = path + "/scripts/" + script; This works fine on Windows. But on Linux (running using Mono Runtime) it goes to the current users home Directory...not the directory of the executable. Is this a bug? And can someone suggest a workaround? 回答1: It's not that