My build keeps hanging on the psexec call

Problem Calling psexec from an invoke process activity on a 2008 Server and it is hanging. Solution Upgrade to 1.98 of psexec and use the -h switch to run with the account's elevated token. Explanation If the target system is Vista or higher, the -h allows the process to get past the UAC that is preventing the application from running as expected. PSTools

Command line tool for Work Item Queries

Problem I need to script my work item query administation. Solution Use the Work Item Query Administration tool from CodePlex http://wiqadmin.codeplex.com/ Examples This will list out all the queries and the paths you need to export them wiqadmin list /collection:http://MytfsUrl:8080/tfs/defaultcollection /p:MyProject /recursiveThis is how you can export one once you know the path. Make sure you use “ on the path wiqadmin export /collection:http://MytfsUrl:8080/tfs/defaultcollection /p:MyProject /n:"Team Queries/Iteration 1/Active Bugs" /f:bugs.wiql

How to debug a Visual Studio Extension

Problem I am writing a class library to extend Visual Studio but I can't figure out how to debug it. Solution Right click on the class library project in Solution Explorer and select properties.  This will display the property pages for the selected project.  Click on the Debug tab on the left hand side.  Under the Start Action section select the second radio button Start External Application and browse to the exe you need to start. For Visual Studio extensions find the devenv.exe version you need.  Under the Start Options selection add the following Command line arguments:/rootsuffix ExpNow when you press F5 to debug your class library the debugger will launch another instance of Visual Studio to load your class library and allow you to debug it. Explanation Class libraries don't execute themselves and require an executable to load the library so we can debug it.  Therefore, we must instruct the debugger on which application to load to host our class library so we can debug it.The command line arguments we pass for a Visual Studio extension makes sure that we don’t corrupt our registry on our machine.  That argument tells the second instance of visual studio to use an experimental hive in the registry to make any needed registry changes.  This leaves our real registry clean.While developing an extension for Visual Studio there may become a time where the debugger has an issue starting the second instance of Visual Studio. One cause of this issue is a corrupted experimental hive.  You can execute Visual Studio from the command line passing in the following arguments to have it restore your experimental hive:devenv.exe /setup /rootsuffix Exp /ranu

How to reach nested controls using Coded UI Test Builder

Problem I have a span nested inside an anchor tag and I cannot reach it with CodedUI Test Builder. Solution Use the control navigation button in the Add Assertions dialog.   Explanation While trying to check the attributes on a link in a web application I could never see the font style to determine if it was bold or not.  After further investigation I realized the style I was looking for was not on the link but actually on the span inside the link.  However, whenever I used the cross-hair icon I was only able to select the hyperlink and never the span.  Then I noticed that there is a button in the Add Assertions dialog on the far right that allows you to move to other controls relative to the one currently selected.  Once I clicked the down arrow on the button I was moved to the nested span inside the hyperlink.  

I can't get rid of an old Project Template

Problem I was trying to learn how to create a custom Project Template and now I can't get rid of it! Solution Make sure all the .zip files for your Project Template have been deleted and run devenv /setup Explanation Running devenv /setup will force Visual Studio to reset all the Project Templates and also get rid of old ones.