VSS and mapped file locations

Tags: .NET

Just a quick tip about the some new problems we're having with VSS:
To ease integration and control, all developers on the team have their local development drive mapped to drive P:\, to make sure all file references are consistent between developers. Since it's just a subst-mapping and actually points to the original location, some of us opened the solution from the original location expecting it to work.
It does not work.
The two locations might be identical on the local disk, but as far as VSS is concerned they are two different locations with different data. If you checked out a file in P:\ and try to check it in from C:\MyProject\, VSS will complain that you are checking it in from a different location. This might lead to any number of annoying errors and even loss of data if you're not careful. So be careful, and always open your solution from the same location.

7 Comments

  • Sean said

    Hi,
    as a good practice, don't store Solution files in VSS. Only projects. If you're are a developer of the internals, others are not supposed to see the projects you're attaching to the solution. And vice versa. BEsides, this way your files may reside at different local locations, since there's no global solution, but per machine.

  • Avner Kashtan said

    In this case it's irrelevant. The projects themselves are under source control, and they are opened relative to the solution - if I opened the SLN from P:\ or from C:\Dev, the projects under it are different as far as VSS are concerned.

    And more generally - can I even add a project to VSS while the solution itself controlled? A quick check with VS2005 seems to indicate I can't, and then I have the same problems I wrote about in my last VSS post a few days ago.

  • yoramo said

    The best suggestion I can give is use a commercial source control tool like perforce or other tools.

    You will be surprised of the capabilities that it will give you.

    If you are using the P: drive to get a unique path in your solution files. You can use a script that will update the files path on your machine locally.

Comments have been disabled for this content.