View or compare the changes made to files
You can quickly view any version of a file, or compare two versions of a file, in a text viewer in Blend para Visual Studio 2012. Comparing files is useful if you want to highlight the changes that a team member has checked in.
To view a version of a file
The following procedure opens the file in a text viewer. Alternatively, you can get a specific version of a .xaml file and then open it on the artboard. For more information, see Get a specific version of a file.
In the Projects panel, right-click the file that you want to view, and then click View History for This Item.
The History dialog box appears, listing all the changes that have been made to the file.
Sugerencia To identify the file that you want to view, you can read the check-in description in the Comment column, or select a version from the list, and then click Details to see the list of files that were checked in with this version.
Select a version from the list, and then click View.
A text editor such as Notepad opens to display the file. You can use the search mechanisms of the text editor to find text, and you can save the file to a different location.
Sugerencia If you have the file checked out, you can overwrite it with the version you're viewing to effectively revert to the older version of the file. However, that version of the file might depend on older versions of other files that were required to build the project without errors. A better procedure for reverting can be found at How to: Roll Back a Changeset on MSDN.
To compare two versions of a file
In the Projects panel, right-click the file that you want to view, and then click View History for This Item.
The History dialog box appears, listing all the changes that have been made to the file.
Select one of the versions from the list, press and hold down the Ctrl key, and then select another version.
Click Compare.
A text viewer appears with two panes, one for each version of the file. A legend that defines how lines are color-coded is displayed at the bottom. If you click inside one of the panes, you can use the tools at the top to find text, set bookmarks, and cycle through the highlighted differences.
To compare the file you have open to an older version
This is useful if you are having trouble resolving conflicts while checking in, and you want to see the differences between the file that you have not yet checked in and the most recent version.
In the Projects panel, right-click the file that you want to view, and then click View History for This Item.
The History dialog box appears, listing all the changes that have been made to the file.
Select only one version, such as the most recent version (the one with the largest changeset number).
Click Compare.
A text viewer appears with two panes: one to display the version that you selected, and one to display your local copy.
Example of two versions of a file being compared
Vea también
Tareas
Undo or view the list of pending changes
Get a specific version of a file