I get this error from my migration of NUnit to Team System when running some of the tests in Visual Studio:
Test method XXX.XXX.Data.Tests.Path.Method> threw exception: System.Configuration.ConfigurationException: Invalid section name. The section 'dataConfiguration' does not exist in the requested configuration file 'C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\vstesthost.exe.Config' or the file 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Config\machine.config'. Make sure that the 'enterpriseLibrary.configurationSections' configuration section exists in one of the files and that the section 'dataConfiguration' is defined..
It sounds like it can't find the app.config/web.config file.
With MSTest, it doesn't test in the usual "output" directory. As a consequence, the "copy to output directory" (etc) flags do nothing. You need to tell it which files to deploy to the test folder; there are two ways:
[DeploymentItem]
attribute to your test, telling it which files are neededI don't really like either approach - in fact, I tend to use TestDriven.NET to run the tests, which does it the way you expect it to behave.
Of course, TestDriven.NET would also run your NUnit tests in the IDE including code-coverage etc - which would then beg the question: why change your existing tests if they can work in the IDE? And the obvious answer is "we've paid for MSTest, and TestDriven.NET isn't free"...