Data Driven Unit Tests fail during TFS 2008 Build…
but not when executed in Visual Studio 2008.
Error Message:
The unit test adapter failed to connect to the data source or to read the data. For more information on troubleshooting this error, see "Troubleshooting Data-Driven Unit Tests" (http://go.microsoft.com/fwlink/?LinkId=62412) in the MSDN Library.
Error details: An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
Solution: Don't specify the connection string and the table in the constructor of the DataSource attribute, but follow this (use the configuration section).
Make sure you specify Version 9.0.0 and not 8.0.0 like in the sample!