I was recently doing a VSTS demo at a customer using a newly built machine. As it turned out I practiced just about everything before the demo except the Load Testing features - which I typically do at the end. I recorded the web test and setup the load test - this all worked fine. Now time to execute the Load Test. I got an error “"Input string was not in a correct format" when trying to run this test.
I must have spent the good portions of the next couple of days trying to resolve this - and you always end up learning quite a bit of additional stuff along the way. In my case I even tried to reverse engineer the code and tried to attach the VS and .NET Framework debugger to try and resolve things -- maybe a different post on this.
After all this I decided to go through the event log AGAIN (yes I did this before) and noticed some entries to do with performance counters that looked strange. Anyway I went to perfmon and found a number of entries in numbers rather than proper textual descriptions. To validate my thing I went back to the load test and removed all the perf counters. This time no error - except the load test is of no real use now. Did some hunting and it turned out my performance counters had become corrupt -- I went into VS Server Explorer, Performance Counters and got the same error.
After some hunting I found reference to lodctr. I did a lodctr /? and decided to try the “lodctr /r” command (note I have not fully investigated the full implications of this). None the less it worked. Most of the perf counter were restored to the proper names and my load tests ran without error.