当我运行选定的测试时,测试在测试资源管理器中正确运行。但是,当使用Run All
按钮时,VS2012 会抛出一个System.Exception
状态
找不到主应用程序集...
有没有可以配置测试资源管理器来查找应用程序集的地方?
一个例子将不胜感激。
当我运行选定的测试时,测试在测试资源管理器中正确运行。但是,当使用Run All
按钮时,VS2012 会抛出一个System.Exception
状态
找不到主应用程序集...
有没有可以配置测试资源管理器来查找应用程序集的地方?
一个例子将不胜感激。
This is a divide and conquer suggestion in finding the problem.
Place the attribute [IgnoreAttribute] over all of your tests but one. Do run all. Does the same happen? If not remove the ignore over another test and run all again. Keep doing it until failure. Is a specific test in combination failing with another? If so what is that telling you...
If failure occurs immediately or regardless of the tests choosen, check the initialize methods which have [ClassInitialize()] or [TestInitialize()] over them (if you have them) and verify that they are not causing the problem such as an intiailzation happening more than once when it should only be done once by putting a breakpoint in the methods them and seeing if they are called as expected.