How to: Connect or Disconnect a Solution or Project

As described in Introducing Source Control, a Visual Studio solution can have one or more bindings to source control. A connection is automatically made when you bind an item to source control as described in How to: Bind or Unbind a Solution or Project. You can connect manually as described in this topic.

If you disconnect your computer from the network or lose connectivity for some other reason, you must temporarily disconnect the bindings for the solution to edit its contained projects and files. When you disconnect a solution from source control, the only basic command that you can use is Check Out. When you check out a disconnected item, the local copy is made writable in your working folder so that you can edit it. When you are able to access the database again, you can reconnect the solution and synchronize your local copy with the latest master copy.

Procedures

To connect a solution or project to source control

  1. In Visual Studio, open Solution Explorer and select the item(s) to connect.

  2. On the File menu, click Source Control, then Change Source Control.

  3. In the Change Source Control dialog box, click Connect.

  4. Click OK.

To disconnect a solution or project from source control

  1. In Visual Studio, open Solution Explorer and select the item(s) to disconnect.

  2. On the File menu, click Source Control, then Change Source Control.

  3. In the Change Source Control dialog box, click Disconnect.

  4. Click OK.

See Also

Tasks

How to: Bind or Unbind a Solution or Project

Concepts

Introducing Source Control

Reference

Change Source Control Dialog Box

Other Resources

Performing Source Control Tasks