title: Getting the ProjectPath or SolutionPath in code
body: <p>I need to know if there is some kind of preprocessor-directive, or maybe just a trick that allows me to embed the solution folder an application was compiled under into the application itself.</p>
  
  <p>We have a system that needs to check for files on the local machine and if they are not present, goes and fetches them from a remote server or cloud service.  This has to be abstracted for portability reasons.  We have unit tests that make sure the remote-fetch-and-store logic works properly, but before we push to servers, I need to make sure people test locally end-to-end, so I want to have a dummy remote file provider that simply checks in a different folder on the local machine.  I don't want to presume a particular path (like C:\dummy_files) nor can I assume that the files will be relative to the actual execution path for the compiled assembly (therefore something like Directory.GetCurrentDirectory() isn't going to work).</p>
  
  <p>If I know where the executing application was compiled from, then the files should be relative to the solution directory along with the source code.  Obviously, I'll put preprocessor directives to only allow this code to run in debug.</p>