Get your code reviewed with Visual Studio

Azure DevOps Services | Azure DevOps Server 2022 | Azure DevOps Server 2020 | Azure DevOps Server 2019 | TFS 2018

Visual Studio 2022 | 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 their 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.)

Note

My Work and Code Review features are available with the following editions:

  • Visual Studio 2022: Visual Studio Community, Visual Studio Professional, and Visual Studio Enterprise
  • Visual Studio 2019, 2017, and 2915: Visual Studio Professional and Visual Studio Enterprise
  • Visual Studio 2013: Visual Studio Premium 2013 and Visual Studio Ultimate.

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.

    Screenshot of My Work from the Team Explorer home page.

  2. He requests a review.

    Screenshot of 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.

  8. Johnnie completes the review by selecting Send & Finish.

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.

  3. Jamal closes the review by selecting Close Review.

Next steps