Share via


Get your code reviewed with Visual Studio

Azure DevOps Services | Azure DevOps Server 2020 | Azure DevOps Server 2019 | TFS 2018 - TFS 2013

Visual Studio 2019 | Visual Studio 2017 | Visual Studio 2015 | Visual Studio 2013

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 teamexplorer

  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 difference 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

Next steps