Why can't “async void” unit tests be recognized?
问题 async void unit tests cannot be run within Visual Studio 2012: [TestClass] public class MyTestClass { [TestMethod] public async void InvisibleMyTestMethod() { await Task.Delay(1000); Assert.IsTrue(true); } } If I want to have an asynchronous unit test, the test method has to return a Task: [TestMethod] public async Task VisibleMyTestMethod() { await Task.Delay(1000); Assert.IsTrue(true); } Why is it so? Not that I absolutely need to have an async void test method, I am just curious. Visual