An exception occurred while invoking executor '

2019-01-27 13:08发布

We are using Visual Studio 2012 and Team Foundation Server 2010 in our project. Since, we are using Microsoft Fakes, we could have not used the started Test functionality of our Team Build 2010, I have created a build activity which invokes VSTest.Console.exe passing the test assemblies. This approach has been working well for us. However, after a recent check-in we are getting the following error when executing Vstest.console.exe

Error: An exception occurred while invoking executor 'executor://mstestadapter/v1': Object reference not set to an instance of an object.

I copied the binary files to my local machine and was able to get the error again. Interestingly, we run a dev build before check-in which runs the same vstest.console.exe with the same parameters and that works correctly. I have got two folders on my machine, for one the call works fine and for other it doesn't. The compiled assemblies look same size and there aren't much differences to suggest.

I tried using Process Monitor but couldn't find anything obvious other than that the process returns with an exit code 1. Does anybody know much about this error? Is there any way I can find out more information from my test run?

Regards,

Hamid

7条回答
smile是对你的礼貌
2楼-- · 2019-01-27 13:50

I have the same error specified in the subject when in the AssemblyInfo of the project is specified the AssemblyAttribute:

[assembly: AssemblyCulture("en")]

If this attribute is present, the run of the unit tests fails. If I remove this line of code or I remove the en language, the run of the unit tests success.

查看更多
登录 后发表回答