I'm working with Visual Studio 2012 and I'm developing some integration tests using Visual Studio's test framework (mstest).
Some days ago I found some info regarding that now Visual Studio 2012 can execute tests in the output directory (i.e. bin\Debug, bin\Release) and I disabled deployment in order to simplify a lot of things.
Although most of the things worked as expected, I found a big problem: some [ClassInitialize]
code executes a process using Process
class and, just after disabling deployment, whenever a process is launched, I get this error:
My first impression was that maybe something in the process launching was incorrect and I copy-pasted the same command and arguments into a CMD and it worked as expected.
After some investigation, I figured out why happened this: because I configured test runner to be launched as a 64bit process. After switching to X86, for example Process.Start("cmd")
worked.
But what's worse is SQLCMD - the actual process that I'm launching within test run - still fails with the so-called error.
This error happens when any process is launched within Visual Studio test runner.
What happens with SQLCMD when launched from a test runner?