I have a visual studio solution that comprises of several projects and are separated into different directories.
In my c# or vb.net code I want to determine the base directory (or the directory that the solution is in).
A dirty solution would be to call the directory parent.parent.parent until I find a file *.sln but I also have several solutions in other directories that I dont want to be returned.
I am just wondering if there is a cleaner method maybe part of System.Diagnostics.Debugger or similar?
I look forward to your reply, thanks.