Running unit tests on VS2012 is lately very slow, when I run them it takes about 12 seconds before they start actually testing.
When I debug it is the same story before I hit the first breakpoint.
I hooked up process monitor and then I found this:
CreateFile \\WORKSTATION*\MAILSLOT\NET\NETLOGON SUCCESS
WriteFile \\WORKSTATION*\MAILSLOT\NET\NETLOGON BAD NETWORK PATH
After that it stays 9 seconds quiet.
CloseFile \\WORKSTATION*\MAILSLOT\NET\NETLOGON SUCCESS
What on earth is going on here? I cannot find any relation between MAILSLOT and Visual Studio at all, but it is going on for about 2 weeks now.
This may not be related, but I noticed in some testing I was doing today that my Unit tests seemed to be running slower and slower. By chance I exited/restared Visual Studio and my tests are much faster now. There may be some sort of memory leak or other resource problem in the Unit Test mechanism. I am running update 1.
I had the same issue, using VS2012 Update 1. Based on the suggestion in http://social.technet.microsoft.com/Forums/en-US/winserverDS/thread/20eb50e9-3e68-4d29-bcdd-a4fc166b9c00 I disabled NetBios over TCP on my NIC. The tests now start up immediately, and procmon shows the time waiting on \MACHINE*\MAILSLOT\NET\NETLOGON dropped from 5 seconds to about 40 microseconds.
Visual Studio update 1 is now available and apparently addresses some speed issues with unit testing, whether it's related to Mailslot or not I don't know but presumably that's possible if it's in use as a communication mechanism by mstest somehow, from the MSDN forums:
Download links and info here:
http://blogs.msdn.com/b/visualstudioalm/archive/2012/11/26/visual-studio-and-team-foundation-server-2012-update-1-now-available.aspx