次の方法で共有


A Refresher on "Refresh"

When dealing with forum posts about SCC issues, many respondents will suggest that the user perform a “refresh” to see if this remedies the problem. While this is often good advice, the term refresh has some ambiguity due to the number of refresh options available.

  1. Refresh via Solution Explorer toolbar button
    This mechanism sends an event back to the currently selected (in Solution Explorer) project or projects notifying them to refresh. Different project systems may take different actions when presented with a “refresh” event. For instance, directory-based web projects will scan the local web project directory looking for added or removed files and will then update the Solution Explorer view.

    Most projects will query the SCC provider to reacquire the SCC glyphs presented in Solution Explorer. However, this query does not refresh (i.e. reacquire) any SCC status.

    Because this operation does not refresh SCC status, it is typically not helpful when trying to resolve situations where the IDE’s SCC state is inconsistent with respect to the SCC server.

  2. Refresh via File->Source Control->Refresh Status
    This mechanism sends a notification directly to the SCC provider and causes it to contact the server to refresh both the current pending change information and the SCC status for the item(s) selected in Solution Explorer.

    It is important to note that the operation is scoped to the current Solution Explorer selection. Typically one will ensure that the solution is selected prior to issuing this refresh operation to ensure all items refresh.

    Once this operation completes the Solution Explorer and Pending Changes toolwindows should be up-to-date. This is usually what is meant when someone suggests performing a refresh to resolve an SCC issue.

  3. Refresh via Pending Changes toolbar button
    In VS 2005, the Refresh toolbar button in the Pending Changes toolwindow performs identically to the File->Source Control->Refresh Status operation as discussed in item #2. This includes scoping the operation to the current Solution Explorer selection, so be sure you have the intended target selected (e.g. the solution node).

    In the Orcas release of VS and TFS, the Pending Changes "Refresh" button is slated to change to always scope the Refresh to the entire solution. The File->Source Control->Refresh Status operation will remain scoped to the Solution Explorer selection.

  4. Refresh via Source Control Explorer toolbar button
    This operation will notify the SCC provider to contact the SCC server and refresh the status for all of the expanded (e..g viewable) nodes in the Source Control Explorer treeview and listview. The listview and treeview are then updated using the newly acquired data. Obviously, this Refresh operation is most helpful in situations where the Source Control Explorer is out-of-sync instead of Solution Explorer.