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开发者_StackOverflow中文版\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?
You may check for version incompatibility. E.g. you get this error when trying to run VS2008 Tests with VS2010 mstest.exe.
It happened to me in VS 2012, the problem being that I had 2 unit test projects referencing to different versions of the assembly 'Microsoft.VisualStudio.QualityTools.UnitTestFramework'
I saw the problem when compiling the solution, in the output window from the test section:
------ Discover test started ------
index was outside the bounds of the array
精彩评论