You cannot get a Web project from source code control if the Web project is deleted from the Web server (317622)



The information in this article applies to:

  • Microsoft Visual Studio .NET (2002), Professional Edition
  • Microsoft Visual SourceSafe, 32-bit, for Windows 6.0

This article was previously published under Q317622

SYMPTOMS

If a Web project is deleted from the Web server, you cannot use the Microsoft Visual Studio .NET IDE to get the latest version of the project.

You see the solution in Solution Explorer, but the solution does not contain any projects. When you try to perform a get on the solution to update this file, the solution does not get the project.

If you reload the project file, you receive the same error message that you received when you first tried to open the project after the file was deleted on the Web server.

CAUSE

When you open the Web project from source code control, you are prompted to set a Web location where the project resides. During that step, that information is passed to Microsoft Internet Information Services (IIS) to create this folder on the Web server as a virtual root. Because you have deleted the project file at this location, the project file and folder no longer exist.

RESOLUTION

To resolve this behavior, follow these steps:
  1. Close the solution in Solution Explorer.
  2. On the File menu, point to Source Control, and then click Open From Source Control.
  3. 3. Open the Visual SourceSafe Project that you first created. For example, open OurWebApp. A dialog box appears that asks if you want to merge, overwrite, or replace the items locally. In the dialog box, click Replace.

    You now have a fresh copy of the latest files from the Web server.

STATUS

This behavior is by design.

MORE INFORMATION

Steps to reproduce the behavior

Create a fileshare Web project

Follow these steps on the first computer:
  1. Open the Visual Studio .NET IDE.
  2. On the File menu, point to New, and then click Project. The New Project dialog box appears.
  3. Click Visual Basic Project, and then create a new Microsoft ASP.NET Web application that is named OurWebApp.
  4. In Solution Explorer, right-click the OurWebApp.sln file, and then click Add Solution to Source Control. Click OK when you receive the following warning message: You are attempting to add some File Share Web access projects to source control. If you continue, you will no longer be able to open these projects using FrontPage Web access.By clicking OK, you let Microsoft Visual SourceSafe (VSS) create the OurWebApp project.
  5. Click OK in both dialog boxes.

Open the shared project on another computer

Follow these steps on the second computer:
  1. Open the Visual Studio .NET IDE.
  2. On the File menu, point to Source Control, and then click Open From Source Control. If you are prompted for the database and logon information, locate the database that you created the original project on, type your password, and then click OK.
  3. In the Create Local Project from SourceSafe dialog box, click the OurWebApp project, and then click OK three times. The Open Solution dialog box appears.
  4. By default, your local solution file should be selected. If it is not selected, click the OurWebApp solution file, and then click Open. The Set Project Location dialog box appears.
  5. Click the default location as your VSS working area.
  6. On the File menu, click Close Solution to close the solution.

Delete the application from the Web server

Follow these steps on the Web server:
  1. Find your Web application in the server list. In IIS, expand Default Web Site, and then locate the virtual root that has the same name as the project that you created in the "Create a fileshare Web project" section. In this example, the virtual root is OurWebApp.
  2. In the left pane, click OurWebApp, and then locate the OurWebApp.vbproj file.
  3. Delete the OurWebApp.vbpoj file.
  4. Close IIS.

Try to open the solution

Follow these steps on the second computer:
  1. On the File menu, point to Recent Project, and then click OurWebApp to open the OurWebApp solution. You receive the following error message:
    "Unable to read the project file 'OurWebApp.vbproj'. The system can not read the file specified.
  2. Click OK.
  3. You may be prompted to log on to a VSS database. Enter the information that is requested, and then click OK.

Modification Type:MajorLast Reviewed:1/6/2005
Keywords:kbprb KB317622 kbAudDeveloper