Why do I get an "Index outside the array" when I run mstest.exe at the command line?

I run 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

the index was outside the array

message back.

Any clue to debugging this?

+4
source share
2 answers

You can check version incompatibility. For instance. You get this error when you try to run VS2008 tests with VS2010 mstest.exe.

+3
source

This happened to me in VS 2012, the problem is that I had 2 unit test projects linking to different versions of the assembly "Microsoft.VisualStudio.QualityTools.UnitTestFramework"

I saw a problem when compiling the solution in the output window from the test section:

------ Open the test test ------
the index was outside the array

+2
source

All Articles