Update: Shortly after posting this I was informed by Christian Landgren that you can go straight to the Attachments tab when editing a work item and hit CTRL+V to paste a screenshot. It will automatically be named "Screenshot.jpg". Thanks for the tip, Christian!
I think this is new in VS 2010? I guess I did a lot of work to no benefit whatsoever. :) Only reason I can think of for still using this approach is if you want a mandatory screenshot field?
Prerequisites
- Download and install TFS Power Tools
- Download and install Custom Controls for TFS Work Item Tracking on all clients (computers on which you run Visual Studio or Team Explorer)
Modify work item types to include the screenshot control
After installing TFS Power Tools you’ll notice a few additional menu options on the Tools menu.
Simply click Process Editor –> Work Item Types –> Open WIT from Server…
…next select the work item type you want to modify:
Switch to the Layout tab, right-click the position where you want the screenshot control to appear and then click New Control:
Enter a suitable label (optional) and then select ScreenshotControl as the control type:
Paste a screenshot directly into your work item
Create a new Bug work item to see the screenshot control in action.
Simply take a screenshot so that you have an image in your clipboard. Simply hit the “Print Screen” key, or create a screen clipping with a tool such as OneNote, Jing, or SnagIt.
Click the Capture button. You will then be prompted to add a name and an optional comment for your image:
The captured screenshot will now be available among the work item attachments:
Simply double-click My screenshot.jpg to view it.
Customize your process template to include the screenshot control
You have to add the screenshot control to each work item type individually for all projects where you want the screenshot control to appear. If you want the screenshot control to appear for all work item types for all new projects you have to modify the process template on your TFS server. Here is some additional information about modifying TFS process templates.