“Unable to read the project file '<file name>'. The system can not find the file specified.”
Sometimes you may receive this error when loading a solution in Visual Studio .NET that contains a web services project. I have found this error occurs when the solution was created on one machine and you are trying to set up the source code environment on another. However there may be other instances in which this error occurs.
One way to work around this is to remove the project and add it back in again from the virtual directory that you have created to contain it. This is time consuming though because you have to do this every time you load the solution. In an environment where the source is under version control, it also means you have to check-out the solution file and check it back in every time (or at least undo your check-out).
There are few articles that describe how to address this problem, and none that really describe the cause. When I get this problem, I have devised a method for establishing the source code environment properly on my local machine to avoid the time consuming work around.
1. Copy the files from the Visual SourceSafe database to your local computer.
2. Create the virtual directory for the web services project manually and point it to the desired directory. Configure the application & script execution settings (IIS) (no application name etc).
3. Locate the <project>.vbproj file in IIS by clicking on the virtual directory and displaying the contents and delete it.
4. Open VS.NET and open the solution from visual source safe
5. When prompted for the location of the web service project, select the virtual directory you have created for the web services project and hit OK.
Visual Studio will extract a new copy of the .vbproj file into the Virtual Directory and your solution should now work as expected.
Matthew Glover