If you've ever used the Change Source Control feature in Visual Studio .NET 2003 when disconnecting from the network or when branching a project or solution, you've come face to face with a source control binding.

Today, I'll expand on a post I made last Tuesday (Guidance on Creating Projects and Solutions) in an attempt to better explain the concept of a source control binding.  In that post I wrote, "When you add the solution and initial project to source control, the SCC provider does not differentiate between the project and solution--and this is the important part--because the initial project file (*.*proj) and the solution file (*.sln) occupy the same folder on disk. Therefore, the source control provider creates a single binding for both containers. Internally, we discuss solutions and projects in terms of bindings, or connections between the working copy of a project or solution and its master copy under source control. You may recognize these words, which appear in Visual Studio's Change Source Control dialog."

To be a little more clear, a source control binding is like a data line through which a connection between your working copy of a source-controlled solution and its master copy in the database can be established.

You can think of a well-formed (defined below), source-controlled, multi-project solution as a house with multiple rooms. When you build the house, you install a single highspeed data line from one room to the street. Inside the house, you install a router behind a firewall to distribute the data feed to other rooms and you pay an Internet service provider to connect your house to the Internet.

In Visual Studio .NET, that single data line is a source control binding. When you open a source-controlled solution, a connection is created across that binding which establishes a handshake between your working copy of the solution on disk and the master copy of the solution in the source control database.

Conversely, a source-controlled, multi-project solution that is not well-formed is like a house in which every room is connected to the Internet directly. Internet charges are more expensive than in the single-connection house, maintenance costs are higher, and switching to a different Internet service provider is much more difficult and time consuming.

Just as in the house with a single connection to the Interent, it's better to have a solution and all of its projects share a single source control binding. You can create well-formed, multi-project, single-binding solutions by creating a blank solution as outlined in Guidance on Creating Projects and Solutions. You can also do so by selecting the Create Directory for Solution option in the New Project dialog box when creating a solution-project pair.

Single-binding solutions are easier to:

·         Disconnect from source control in order to work offline.

·         Connect to the database after reconnecting to the network.

·         Branch in one step.

++++++++++++++++++++++++++++++++++++++++++++++++++++

This posting is provided "AS IS" with no warranties, and confers no rights. Microsoft kann für die Richtigkeit und Vollständigkeit der Inhalte in dieser Newsgroup keine Haftung übernehmen. Este mensaje se proporciona "como está" sin garantías de ninguna clase, y no otorga ningún derecho.