I was trying to integrate my solution which contains a web project with Visual Source Safe and was getting the message: “Unable to read the project file. The system can not find the file specified.”
I found a good article on how to fix this at: http://www.inventua.com/blogs.content?EntryID=3
Unfortunately, this didn’t fix my problem.
I had a variety of issues with VSS asp.net integration. What I specifically wanted to do was:
1) Have my web project be under the same directory structure as my solution (not in c:\inetpub\wwwroot)
2) Have the web location be different from the actual web project name. e.g. the web project name is Com.TestApp.UI.Web but I actually want the location to be http://localhost/TestApp and not http://localhost/Com.TestApp.UI.Web . It is possible to deploy the project to any URL but I wanted everything to be consistent in every environment.
I’ve read a lot of articles which helped but no one article could solve my exact issues. This is the procedure that I had to work through to get the Visual Studio/VSS integration working.
Assumptions
1) Assume solution is [my solution]
2) Assume web project is [my web project]
3) Assume virtual root name is [my virtual root] — this may be the same as [my web project]
4) Assume user logged on is [user]
If the project has been already attempted to be loaded, we should clean up first:
Clean Up
1) Delete the VSWebCache directory C:\documents and settings\[user]\VSWebCache\[my virtual root] if it exists
2) Delete the virtual root [my virtual root] from IIS
3) delete the solution directory where [my solution] is currently located. If any files are locked perform an IISRESET and also close VSS Explorer if applicable
Configuration
1) Open up VSS Explorer. Get latest version (recursive, build tree)
2) Set permissions on the [my solution] directory. Add IIS_WPG with the following permissions: Read, Read & Execute, and List Folder Contents
3) Open [my solution]
4) The set project location dialog will open. Hit cancel.
5) Accept any other dialogs that may come up.
6) Delete the project file from the [my web project] directory.
7) Open IIS Admin and create a new virtual directory [my virtual root] that points to the directory that contains [my web project]. Accept all the defaults. Open the [my virtual root] properties page and set the Execute Permissions to Scripts Only. I did not add an application name.
8 ) Now, back in Visual Studio, open the solution from source control. (File->Source Control->Open From Source Control). Browse to the solution folder in VSS. Click overwrite when prompted.
9) The set project location dialog will open again (as in step 4). This time point to [my virtual root] and click OK.
10) As a bonus delete the directory that was created by visual studio
during step 4. This will probably be in c:\inetpub\wwwroot\[my virtual root]. It’s ok to delete this because the virtual root
actually points some where else now.
Categories: .Net
No Comments »

