C#: get build directory of test project
<p>In C# (Vistual Studio 2008), I have a test project in which I need to load an xlsx file. For that, I added a file with copy-always so that it ends up in the build directory, but all of the following return a wrong path:</p>

<ol>
<li>System.Reflection.Assembly.GetAssembly(typeof(testclass)).Location;</li>
<li>AppDomain.CurrentDomain.BaseDirectory</li>
<li>Directory.GetCurrentDirectory();</li>
</ol>

<p>They all give me:</p>

<pre><code>C:\\Users\\username\\Documents\\visual-studio-projecten\\projectname\\TestResults\\username_ICT003 2012-06-20 12_07_06\\Out
</code></pre>

<p>and I need </p>

<pre><code>C:\Users\username\Documents\visual-studio-projecten\projectname\TestProject\bin\Debug\SupportFiles\
</code></pre>

<p>How do I accomplish that?</p>
