Setting filepath to reference a file at the root of the Solution or Project
<p>I want someone to just be able to fire up my solution, and in the Program have it run and just put this csv at the root of the project for example so that it just picks it up in my method that's gonna read this csv file.</p>

<pre><code>File.ReadLines(filePath).Select(a =&gt; a.Split(';'));
</code></pre>

<p>Problem is, not sure how to get this so that if someone copies my solution to their c drive, what this filepath should look like..I want them to be able to fire this solution up, run the console app, and since this file is already in the same directory as my project, just want to basically hard code the filename via constant and not worry about ok, where is this file..it's always gonna be here after they copy it for testing purposes.</p>

<p>So what should I do, include the .csv in my .net project then just make the constant "filename.csv"?  I tried that, does not work.</p>

<p>I end up with this which fails:</p>

<pre><code> File.ReadLines("someFile.csv").Select(a =&gt; a.Split(';'));
</code></pre>

<p>and I've included that file in my project...the main console project where the program is running from.</p>

<p>here's my solution structure</p>

<pre><code>SomeTest (.NET solution and it's the root solution folder)
    SomeTest (console project)
       Constants.cs
    SomeTest.BL
    SomeTest.DL
       filename.csv
</code></pre>

<p>I've moved the actual csv to my DL as I'm using it as the test data source.</p>

<p>So when they copy my SomeTest solution folder down to their c drive, wherever they put it, I need that constant to read <code>C:\\root path to wherever they copied SomeTest folder to\\SomeTest.DL\\filename.csv</code>  see what I mean? I need to hard code the SomeTest.DL after the root path..but I just can't get the root path, in my case C:\www and grab that part and then I'll append for example the \SomeTest.DL\filename.csv" string to it.</p>
