title: Error using Data Source relative path in Excel Data Driven Unit Test
body: <p>I am using a System.Data.Odbc connection string to connect to an Excel data source. The following error occurs when using a relative <strong>dbq</strong> path:</p>
  
  <blockquote>
    <p>ERROR [42S02] [Microsoft][ODBC Excel Driver] The Microsoft Office Access database engine could not find the object 'Sheet1$'.  Make sure the object exists and that you spell its name and the path name correctly.</p>
  </blockquote>
  
  <p>App.config:</p>
  
  <pre><code>&lt;configuration&gt;
      &lt;configSections&gt;
          &lt;section name="microsoft.visualstudio.testtools" type="Microsoft.VisualStudio.TestTools.UnitTesting.TestConfigurationSection, Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/&gt;
      &lt;/configSections&gt;
      &lt;connectionStrings&gt;
          &lt;add name="excelConnection" connectionString="Dsn=Excel Files;Dbq=ExcelDataSource.xlsx;Defaultdir=.;driverid=790;maxbuffersize=2048;pagetimeout=5" providerName="System.Data.Odbc"/&gt;
      &lt;/connectionStrings&gt;
      &lt;microsoft.visualstudio.testtools&gt;
          &lt;dataSources&gt;
              &lt;add name="excelDataSource" connectionString="excelConnection" dataTableName="Sheet1$" dataAccessMethod="Sequential"/&gt;
          &lt;/dataSources&gt;
      &lt;/microsoft.visualstudio.testtools&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>Test Method Attributes:</p>
  
  <pre><code>[DeploymentItem("ExcelDataSource.xlsx")]
  [DataSource("excelDataSource")]
  [TestMethod]
  </code></pre>
  
  <p>Troubleshooting notes:</p>
  
  <ul>
  <li>Works with an absolute <strong>dbq</strong> path</li>
  <li>Excel file is set to 'Copy if Newer' and [DeploymentItem] is specified</li>
  <li>Fails before reaching the [TestInitialize] method; before the Test Deployment Dir is created.</li>
  <li>It worked in the past, perhaps in an older Visual Studio version</li>
  </ul>
  
  <p><strong>Question: Where does defaultDir=.; resolve to?</strong></p>