Upgrading VS from developer preview build to VS 11 beta

In case you are upgrading VS from the developer preview build to VS 11 beta, then there is a chance that you can face a problem while running tests from unit test explorer. The symptoms of the problem are that the tests will not get run and you will observe the following error in the VS output window.

An exception occurred while test discoverer ‘MSTestDiscoverer’ was loading tests. Exception: Attempt by method ‘Microsoft.VisualStudio.TestPlatform.Extensions.TmiHelper.TmiRequest.CreateTestRunConfiguration()’ to access field ‘Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement.TestTypeInstance’ failed.

This error occurs because of the presence of a stale binary on the machine that does not get removed on uninstall of the developer preview build. To resolve this error, please do the following steps.

  • Check that the following binary on your machine exists. If it does not exist, then the resolution mentioned below is not applicable for your machine.

C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel\ v4.0_11.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel.dll

  • Close all instances of visual studio (and stop test controller and/or test agent services if they are also present).
  • Open an administrator command prompt.
  • Take a backup of the above assembly and then delete it.
  • Now launch visual studio and try to run the tests. It should work.
Comments (6)

  1. rob koch says:

    that works.  thanks!

  2. Stephen says:

    Solved my problem.  Thanks!  This probably should be made much more public.

  3. JD says:

    When I encountered this error I thought I was screwed. However, your fix worked for me. Many, many thanks!

  4. leniel says:

    Hi Aseem,

    I'm getting a different error when I try run the tests present in my Test project:

    —— Discover test started ——

    Cannot start process because a file name has not been provided.

    ========== Discover test finished: 0 found (00:00:00.8300782) ==========

    I posted a question at StackOverflow with an image attached: stackoverflow.com/…/114029

    Any solution available?


  5. Hi Leniel,

    I just saw your question on stackoverflow where you mentioned that the problem is resolved now. But in case you still have the problem, please enable the logs of devenv process as mentioned on the below link and paste it here?



    Aseem Bansal

  6. leniel says:


    The problem persists unfortunately. I updated the question: stackoverflow.com/…/114029

    I also tried to get the logs as you described but they weren't generated.