Freigeben über


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

  • Anonymous
    March 01, 2012
    that works.  thanks!
  • Anonymous
    March 04, 2012
    Solved my problem.  Thanks!  This probably should be made much more public.
  • Anonymous
    March 18, 2012
    The comment has been removed
  • Anonymous
    April 15, 2012
    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/.../114029Any solution available?Thanks!
  • Anonymous
    April 15, 2012
    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?blogs.msdn.com/.../how-to-enable-ute-logs.aspxRegardsAseem Bansal
  • Anonymous
    April 19, 2012
    Aseem,The problem persists unfortunately. I updated the question: stackoverflow.com/.../114029I also tried to get the logs as you described but they weren't generated.Thanks,Leniel