Why does visual studio 2012 not find my tests?

后端 未结 30 3279
盖世英雄少女心
盖世英雄少女心 2020-12-07 10:51

I have some tests that use the built in Microsoft.VisualStudio.TestTools.UnitTesting, but can not get them to run.

I am using visual studio 2012 ultimat

30条回答
  •  情话喂你
    2020-12-07 11:25

    I had the same problem.. In my case it was caused by a private property TestContext.

    Changing it to the following helped:

    public TestContext TestContext
    {
        get;
        set;
    }
    

    After cleaning and building the solution (as described in @Ourjamie 's answer), the test methods in the affected test class were available in the Test Explorer.

提交回复
热议问题