MSTest.exe (VS2012) QTAgent32.exe failed

I am trying to run our tests using cmdline. I use VS2012, but always get this error:

error

When I run the tests directly in VS2010 on the same computer, they work fine. I canโ€™t use VS2010 for cmdline because we have the wrong license (build does not work), so I have to use 2012. All Windows updates are present.

Has anyone had problems with MSTest / VS2012?

+7
c # visual-studio-2012 mstest
source share
3 answers

If you want the VS 2012 update to be updated 2, 3, or 4, you can try the following workaround:

Run the following commands at a command prompt:

DEL /S %windir%\*Microsoft.VisualStudio.QualityTools.Tips.UnitTest.AssemblyResolver.ni.dll* DEL /S %windir%\*Microsoft.VisualStudio.QualityTools.ExecutionCommon.ni.dll* 

This is a workaround provided by the Microsoft guys.

You need to run this batch again after installing Visual Studio updates or sometimes even Windows updates.

+6
source share

I followed Yanhua's link to a Microsoft article and found a workaround that I liked more than deleting random files:

Use vstest.console.exe instead of mstest.exe.

Please note that the arguments for vstest.console.exe are different. He wants the test.dll space-separated list to be

 "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe" "TestProject1.dll" 

Here is my msbuild setup that does the same:

 <PropertyGroup> <MSTEST>"$(VS110COMNTOOLS)..\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe"</MSTEST> </PropertyGroup> ... <Target Name="MyTests" > <ItemGroup> <!-- These Items should be evaluated at Target runtime --> <TestFiles Include="..\Tests\**\bin\$(Configuration)\*.Test.dll" /> </ItemGroup> <!-- Run Tests --> <PropertyGroup> <!--TestSuccessOrNot is the property specify whether the Test is sucess or not --> <TestSuccessOrNot>1</TestSuccessOrNot> </PropertyGroup> <Exec Command="$(MSTEST) @(TestFiles, ' ')" > <Output TaskParameter="ExitCode" PropertyName="TestSuccessOrNot"/> </Exec> <Error Text="Tests Failed" Condition="$(TestSuccessOrNot) == '1'" /> </Target> 
+2
source share

I had the same problem. I just uninstalled Update 2 from Visual Studio 2012. Steps:

  • Remove Visual Studio 2012 Update 2 (by viewing installed updates)
  • Reboot system
  • Change the installation of Visual Studio 2012 (using Uninstall or change the program-> change-> Fix)
  • Reboot system
+1
source share

All Articles