parse through visual studio non-web project 2010 to get file listing
<p>I have looked into following links but the code or the approach is not clear to me.</p>

<p><a href="http://stackoverflow.com/questions/1172383/open-a-vs-2005-solution-file-sln-into-memory">Open a VS 2005 Solution File (.sln) into memory</a></p>

<p>I am trying to parse through a non web project to get list of files. Following code does not work for me because Server.MapPath is not available in a non-web project. Please let me know how I could do this. </p>

<pre><code>    string[] filePaths = Directory.GetFiles(Server.MapPath("~/"), "*.*", SearchOption.AllDirectories);

    foreach (string filepath in filePaths)
    {

        string[] folders = filepath.Split('\\');
        string filename = folders[folders.Count() - 1];

    }
</code></pre>
