I am creating a Datadriven Unit (MS Unit Test) using an Excel file (*. Xlsx) as a data source. this is a mistake with the following error
Reverse message: the unit test adapter could not connect to the source data or to read data. For more information on troubleshooting this error, see the "Troubleshooting Data Management Issues" section. ( http://go.microsoft.com/fwlink/?LinkId=62412 ) in the MSDN library. Error Details: ERROR [IM014] [Microsoft] [ODBC Driver Manager] The specified DSN contains an architecture mismatch between the driver and the Application
I set the Copy to Output directory: always for DateRangeTest.xlsx
I also tried defaultdir=.\;, defaultdir=.;anddefaultdir=c:\projectName\bin\debug\;
Here is the section from app.config
<configSections>
<section
name="microsoft.visualstudio.testtools"
type="Microsoft.VisualStudio.TestTools.UnitTesting.TestConfigurationSection, Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
/>
</configSections>
<connectionStrings>
<add name="DateRangeConstr"
connectionString="Dsn=Excel Files;dbq=DateRangeTest.xlsx;defaultdir=.\; driverid=790;maxbuffersize=2048;pagetimeout=5"
providerName="System.Data.Odbc" />
</connectionStrings>
<microsoft.visualstudio.testtools>
<dataSources>
<add name="DateRangeTestDataSource"
connectionString="DateRangeConstr"
dataTableName="Sheet1$"
dataAccessMethod="Sequential"/>
</dataSources>
</microsoft.visualstudio.testtools>
source
share