Manage and Perform Code Reviews

To submit code for review from Visual Studio, follow these steps:
- Go to My Work in the Team Explorer window.
- Make sure that all the changes you want to have reviewed are visible in the In Progress Work section.
- In the In Progress Work section, select Request Review.
- Enter any users that you would like to review your changes.
- Enter a name and description for your changes.
- Select Submit Request.
- Optionally, you can name your shelveset and select Suspend so that you can work on other changes while you wait for review.
To perform a code review, follow these steps:
- Right-click code review request.
- Select Open.
- Select Accept to let the requestor know that you have agreed to review their work.
- Open each file in the shelveset and use the Difference window to see the changes side by side with the original file contents.
- In the Team Explorer window, add any comments that you have to the relevant files. Comments link to a text selection, like in a Microsoft 365 document, so be aware of that when you add each new comment.
- When you have reviewed each file, select Send Comments to let the reviewer know what changes you have recommended.
- If you have no comments, select Close Review and indicate that the changes passed your review so that the reviewer knows to check them in.
If you happen to make a mistake, perhaps your code reviewer will catch that mistake and send you one or more comments. To view and address these comments, follow these steps:
- Go to the My Work page in Team Explorer.
- If you suspended your work after submitting it for review, select it in the Suspended Work section.
- Select Resume.
- Right-click Code review request.
- Select Open.
- Select each comment to view the relevant code and incorporate the review feedback.
- After you have addressed the feedback in a comment, select the box for that comment to indicate that you have done so.
- Depending upon your team’s practices and the scope of the changes that you make in response to feedback, you might want to submit a new code review after you have addressed all of the comments.
