Request a code review with Visual Studio 2012 Premium

Before any code is check-in, a developer can request a code review using Visual Studio. The steps for a code review request and response are as follows:

Send a review request:  (developer)

Do not check-in your code
  • On Team Explorer Home, click on Request Code Review

o   Enter the name of the reviewer
o   Enter the following information
§  Task name
§  Area Path
§  Description about the change (Same as you would use for a check-in)
o   Click on Submit request

This creates a Code review request task and a shelve-set which is used by the reviewer to look at the code changes.

Suspend work while waiting on response (developer)

While waiting for a code review response, the developer can suspend the ongoing work and move on to another task. This can be done as follows:
  • On Team Explorer Home In progress work items & changes

o   Select Suspend & Shelve
o   Press Suspend

This creates a shelve-set and the developer can move on to a different task. Once the review is complete, the developer will be able to select the suspended work and resume work based on the feedback from the reviewer.

Response to a review request: (reviewer)

  • On Team Explorer Home, My Work

o   Click on  Code Reviews and  Requests
o   Open the pending reviews

This shows all the files that have been modified. The reviewer can now do the following:
  • Do a code compare with the previous version
  • Add comments in the areas where a change was made
  • Set the status of the review request according to the comments
  • Press Send and Finish

This closes the review request task and creates another code review response task for the developer to read the comments and resume work.

Only after the code review has passed, the developer should be able to check-in the code and update the task status.