Adding Source Control to a Web Application

See Also

Once you've installed and setup Microsoft® Visual SourceSafe™, you can enable source control for a Web application using any Web project that references that application. Only one developer needs to enable source control for the application.

Visual SourceSafe provides two ways to control source files.

After a developer has enabled source control for a Web application, other developers with open projects that reference the Web application must either refresh or reopen their Web projects for source control to take effect on those projects.

To enable source control for a Web application

  1. In Visual InterDev, open or create a Web project that references the Web application you want to place under source control.

  2. In the Project Explorer, select the project you want to use with source control.

  3. From the Project menu, select Source Control, and choose Add to Source Control.

  4. In the Enable Source Control dialog box, verify that the project name is the one you want for the Source Control Project, and then click OK.

    You can enter a different name for the Visual SourceSafe project if you want. If you use a different name, it must be preceded by the dollar sign ($) and forward slash (/). For example: $/MyWebApplication.

If you want to enable multiple checkouts, you need administrator privileges to the Visual SourceSafe Administrator on your master Web server.

To enable multiple check outs for a Visual SourceSafe project

  1. In Visual SourceSafe Administrator, from the Tools menu, choose Options.

  2. On the General tab, choose Allow multiple check outs.

  3. Click OK.

If you do not know whether a Web application has source control enabled, you can check the property sheet for your project that references that Web application.

To determine whether source control has been enabled for a Web application

You can also disable source control for a Web application from any Web project that references that Web application.

To disable source control for a Web application

  1. Open or create a new Web project that references the Web application you want to remove from source control.

  2. In the Project Explorer, select the project you want to remove from source control.

  3. From the Project menu, select Source Control, and then choose Disconnect Web Project.

When you disable source control for a Web application, the Visual SourceSafe project created when you first enabled source control for that Web application remains on the Visual SourceSafe server. This means you can re-enable source control and choose that Visual SourceSafe project for your Web application.

Re-enabling source control after disabling it may cause some unexpected results. For example, if you disable source control, then delete files from the Web application, then re-enable source control, the files that you deleted will show up in your Web project again. This happens because the files were deleted outside of source control and so the original Visual SourceSafe project still shows them as part of the project. You can remove the Visual SourceSafe project by deleting it from within Visual SourceSafe Explorer.