I have a c# project in this folder c:/devel/myapplication and in this c# solution i have a project which is a console application - c:/devel/myapplication/consoleapplication. In this folder I have some XML files which I want to read programmatically. How do I find the folder for the console application?
var currentPath = Path.Combine(Path.GetDirectoryName(Directory.GetParent(Directory.GetCurrentDirectory()).Parent.FullName), myXmlPath);
This returns the root folder of my project/solution - I want the console projects folder.
Directory.GetCurrentDirectory()
returns bin/debug, which is also wrong
Any ideas?