4

When I run Visual Studio Professional 2013 under my regular user account, I can debug/test ASP.NET applications but I can't run the unit tests for some reason. It looks like it discovers the unit tests at first ("Discover tests finished: 4 found") but then doesn't run them ("no tests found to run").

When I run VS as administrator, it works. I got the idea from Why does visual studio 2012 not find my tests? but the answers don't explain why it makes a difference. Running unit tests doesn't seem like something that should require admin rights.

Community
  • 1
  • 1
wrschneider
  • 17,913
  • 16
  • 96
  • 176

1 Answers1

1

Why do I need to run as administrator for unit tests to work

It depends on the nature of your test cases.

Why Visual Studio should run as an Administrator.

  • Developing for Windows Azure
  • Coded UI tests
  • Using IIS with web application
  • Developing with WCF Profiling
  • Installing updates for various extensions (like NuGet)

You can set devenv.exe to Run as Administrator under Properties and Compatibility tab as a workaround.

CharithJ
  • 46,289
  • 20
  • 116
  • 131