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

前端 未结 7 606
死守一世寂寞
死守一世寂寞 2020-12-20 11:24

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

7条回答
  •  萌比男神i
    2020-12-20 12:15

    We got to the bottom of the problem. We are using Entity Framework 5.0 and we also have a situation where some of our test assemblies are targeting .Net 4.0 and some are targeting .Net 4.5.

    When we are trying to run the tests such that assemblies targeting different versions of .Net framework and using Entity Framework 5.0 are run in the same Test (vstest.console.exe) process, we get this error.

    I think this has to do with the way Entity Framework 5.0 ships with two versions (net40 and net45). Once one version of the library is loaded in the process, the other version cannot be loaded and this caused the error.

提交回复
热议问题