4

I tried running tests via command line, but somehow I couldn't get it to work. Every time I tried to run a test I got an error 'Access is denied'. I also tried running MSTest.exe on its own and still I was getting the same error. I changed the permissions on the .exe to 'Run as administrator', set 'Full Control' to all users as well as changed the 'Compatibility mode' of the .exe to Windows XP but still no luck.

enter image description here

enter image description here

As can be seen above, to be sure that the error was coming from the .exe I tried the following command: C:\WINDOWS\system32>"C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\MSTest.exe" /help and yet again I got the same error - 'Access is denied'.

Running on Windows 8.1, Visual Studio 2010 Ultimate.

I don't know if anyone has ever had a similar issue but I've searched all over Google and I've had no luck whatsoever.

Daniel Grima
  • 2,765
  • 7
  • 34
  • 58
  • Activate mstest logs via mstest.exe.config file, see http://blogs.msdn.com/b/aseemb/archive/2013/01/25/how-to-enable-mstest-logs.aspx for details. This way you could get additional information on the issue you are facing. – Elena Nov 25 '13 at 21:40
  • I did activate the mstest logs, but once again when I tried running a test I got the same error and no log file was saved. – Daniel Grima Nov 26 '13 at 08:20
  • 4
    I just 'solved it' super weird...somehow the .exe file was listed as 0 KB! I simply got a copy of the .exe from someone and replaced it with the one I had, now it's running as it's supposed to. I can't understand how the .exe file got to 0 KB – Daniel Grima Nov 26 '13 at 08:52
  • 1
    Just run into the exact same issue, the exe was 0 kb weird! – Alan Apr 28 '15 at 21:12
  • I've got the same issue.. 0kb – Jack May 26 '15 at 11:48

1 Answers1

0

I got the same problem but with vstest.console.exe. I found two versions in my PC.

This one has 0KB.

C:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\IDE\CommonExtensions\Microsoft\TestWindow

This one has 181KB.

C:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\IDE\CommonExtensions\Microsoft\TestWindow\VsTest

abelbm
  • 51
  • 1
  • 5