What is the .NET equivalent of java's System.getProperty(“user.dir”)?
问题 I am trying to get the full path of a file in my unit test which is in a folder in my project. i tried using Directory.GetCurrentDirectory(); but that returns the directory which my tests are running in. I want the directory of the project (or solution) without having to hard-code it in there. Then I can append the last part of the filename. Something similar to System.getProperty("user.dir") in java 回答1: Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) will get you the path of