Search code examples
exceptionmstest

Why am I getting "Index was outside the bounds of the array" when running mstest.exe on the commandline?


I am running this on my machine

"%ProgramFiles(x86)%\Microsoft Visual Studio 10.0\Common7\IDE\mstest.exe" /testcontainer:"C:\Working\Einstein\Solutions\EinsteinAcceptanceTests\bin\Debug\EinsteinAcceptanceTests.dll" /resultsfile:TestResult.trx"

And I get

index was outside the bounds of the array

message back.

Any clue on how to debug this?


Solution

  • You may check for version incompatibility. E.g. you get this error when trying to run VS2008 Tests with VS2010 mstest.exe.