VS 2010 Test Runner error “The agent process was stopped while the test was running.”

前端 未结 19 1576
醉话见心
醉话见心 2020-12-22 21:13

In Visual Studio 2010, I have a number of unit tests. When I run multiple tests at one time using test lists, I sometimes reveive the following error for one or more of the

19条回答
  •  猫巷女王i
    2020-12-22 21:34

    I had the same problem and it was caused by a finalizer for an unmanaged resource (a file writer that was not getting disposed properly for some reason).

    After wrapping the finalizer code in a try-catch that swallows the exception, the problem disappeared. I don't recommend swallowing exceptions like that, so it would obviously be wise to find out why the exception is occurring in the first place.

提交回复
热议问题