title: .NET: Getting the absolute path for a file when running VS Team Test
body: <p>Currently I have a test class called TestClass.cs in C:\Projects\TestProject\TestClass.cs
  <br />I also have an Xml file in C:\Projects\TestProject\config\config.xml</p>
  
  <p>In TestClass.cs, I have a test method to load the Xml from the filesystem like so:</p>
  
  <p><code>XmlDocument xmlDoc = new XmlDocument();
  xmlDoc.Load(Path.Combine(Assembly.GetExecutingAssembly().Location, "config\config.xml"));</code></p>
  
  <p>Unfortunately, the Location property gives me the value:<br />
  C:\Projects\TestProject\TestResults\klaw_[computernamehere] [time here]\</p>
  
  <p>instead of what I want, which is C:\Projects\TestProject\</p>
  
  <p>I've tried Assembly.GetExecutingAssembly().CodeBase as well with similar results.</p>
  
  <p>Any ideas?</p>