A wee while back, I installed the new WP7 beta tools on my machine. I then started to rewrite the code for my push notification stuff to use the new beta APIs. And everything went fine until I pressed F5 to try and run it. At that point, it spewed out an exception saying
"Connection failed because of invalid command line arguments"
Apparently, I wasn’t alone to have this problem. A quick Google came up with several forum threads and interesting potential solutions.
The problem only arises if you had the previous phone tools installed and the reason is that he emulator creates a directory to store information in. Unfortunately, this directory isn’t removed when the old tools are removed. The good thing is that removing it fixes the issue. So if you run into the error message above, go to %LocalAppData%/Microsoft/ and delete the Phone Tools directory. Then restart the emulator, and it should be running nicely…