开发者

Unit Testing - Lame Error Message - "Failed to queue test run" "Invalid syntax"

I am trying 开发者_如何学Pythonto run my units test and it is failing. Not much info is supplied by Visual Studio.

When I click on the "Test Run Error" link I get this screen.

Lame Error Message http://img442.imageshack.us/img442/4473/lameunittesterror.png

This is spectacularly unhelpful. Does anyone know where I can get a call stack on what is really happening?

The solution builds just fine so I don't see how it can be "Invalid syntax", but without more to go on I am kinda stuck.

This is double weird because these were running just fine two days ago and then I came back to them today and I have this error message. (I can't think of any changes to my system that could have caused this.)

I am using Visual Studio 2008 SP1. The solution has WCF and Linq To SQL in it. The solution runs just fine. The test projects are in MSTest and have Pex and Rhino Mocks in them. The test projects work fine on my both my coworker's and build engine's machines.


Things I have tried (none have worked):

  • Reboot
  • Delete the solution and project and get it again from Source Control (Source control version works for my coworker and my build machine).
  • Looking at the Test Results (there are none because the test does not run).
  • Closing VS, Running caspol -reset from VS smd prompt
  • Running the tests in Visual Studio's Framework
  • Running the tests in Resharper


This worked for me:

caspol -all -reset


Turns out that my Unit tests were set to target "x86" in configuration manager.

Once I changed it to target "Any CPU" it all worked fine.


I had a similar issue running tests in Visual Studio 2010. Behavior was the same but the message was something like:

Failed to queue test run 'me@mycomputer 2014-08-20 15:28:34': Index was out of range. ...

T'was a newly created tests project. But somehow "Target framework" was not set. Selecting an appropriate value resolved the issue. And the accepted answer (to check target platform) helped me to figure this out. Thanks.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜