Get your code reviewed

Before you check in your code, you can use Visual Studio to ask someone else from your team to review it. Your request will show up in his team explorer, in the my work page.

To ask for a code review, make sure you have shared your code in TFVC.

(Are you using Git to share your code? If so, then use a pull request.)

Request a code review

Jamal has changed the border color in the Hello World app, and he asks Johnnie to review the change.

  1. Before he checks in the change, Jamal goes to the my work page.

    My Work from the team explorer home page 
  2. He requests a review.

    Request code review link from the team explorer My Work page 
  3. He submits a request to Johnnie.

    Submit request button on the filled out new code review page in the team explorer 
  4. Jamal suspends his work on Hello World so that he can work on something else while he waits to hear back from Johnnie.

    Suspend link in the my work page of the team explorer 

Respond to the code review request

Johnnie will see the code review request in the team explorer, look at the changes, and give Jamal his feedback.

  1. Johnnie opens the my work page.

    My work in the team explorer home page 
  2. He sees Jamal's code review request.

    The code review request in the my work page 

    You can get email alerts for code reviews, too. If you aren't getting them, you can sign up in the team explorer settings page.

    Project alerts link in the settings page of the team explorer
  3. Johnnie opens the code review request.

    Open the review from the context menu on the review request 
  4. He accepts the review.

    Accept the code review request  
  5. He opens the file that Jamal changed.

    The file link (Site.css) in the code review page 
  6. Johnnie sees that Jamal changed the color to #ddd. He selects the code in the difference window and adds a comment (Keyboard: Ctrl + Shift + K).

    Comment added to Site.css using the differnece window toolbar button 
  7. He suggests a different color instead and sends the comment to Jamal.

    Comment added and sent using the send comments button in the code review page in team explorer 

Update the code based on the review feedback

  1. When Jamal gets a response from Johnnie, he resumes the work on Hello World.

    Resume link in the my work page of the team explorer 
  2. His changes are unshelved and the windows he had opened are restored, so he can incorporate the review feedback.

    Work environment restored after resuming work 

Try this next