How to prevent MSSCCPRJ.SCC from being overwritten?

If you are having a problem using Vault, post a message here.

Moderator: SourceGear

Post Reply
rda
Posts: 42
Joined: Mon Jan 26, 2009 3:47 pm

How to prevent MSSCCPRJ.SCC from being overwritten?

Post by rda » Mon Mar 08, 2010 10:21 am

Hi,

So here's my problem: I have a Visual Studio (.NET 2005) project that has multiple *.sln files in the same folder. The bottom line is that it seems that the MSSCCPRJ.SCC file binding my projects to source control is overwritten with info for a single project any time I open one of the sln files, but only when it (MSSCCPRJ.SCC) is marked read-only. This results in my other solutions losing their binding and having to be re-bound. Rebinding is fine, everything works after that (because MSSCCPRJ.SCC is no longer read-only), except for one catch- I like to source control a basic MSSCCPRJ.SCC file so that my teammates don't have to manually bind their projects to Vault each time they get latest into a new folder. Since a GET LATEST from scratch results in a read-only MSSCCPRJ.SCC file, and the file gets overwritten (presumably by the Vault Classic Client plugin for Visual Studio, which is what I'm using) when it's read-only, I can't do this anymore. Is there any way to fix or prevent this?

So for example, let's say I want my MSSCCPRJ.SCC file to look like this:

Code: Select all

SCC = This is a source code control file

[Project_1.sln]
SCC_Aux_Path = http://serverX/VaultService|:2
SCC_Project_Name = $/MyProject

[Project_2.sln]
SCC_Aux_Path = http://serverX/VaultService|:2
SCC_Project_Name = $/MyProject
When I open Project_1.sln and the MSSCCPRJ.SCC is read-only, it overwrites the file to this:

Code: Select all

SCC = This is a source code control file

[Project_1.sln]
SCC_Aux_Path = http://serverX/VaultService|:2
SCC_Project_Name = $/MyProject
And I lose my Project_2 information. Then when I open Project_2 I get the "This project looks like it is bound to source control but no MSSCCPRJ.SCC could be found" and I get the option to work uncontrolled or permanently remove bindings.

However, if MSSCCPRJ.SCC is not read-only everything seems to work fine.

Thanks!

lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Re: How to prevent MSSCCPRJ.SCC from being overwritten?

Post by lbauer » Mon Mar 08, 2010 1:39 pm

We're not sure if this is a bug or a limit of Vault's MSSCCI implementation.

I'd like to try to reproduce it. Could you provide steps on how you setup your two solutions and added them to source control? Is the "My Project" the same project in each of the solutions, or two different projects?

Did Vault generated the MSSCCPRJ.SCC file that contains info on the two solutions, or was that manually edited?
Linda Bauer
SourceGear
Technical Support Manager

rda
Posts: 42
Joined: Mon Jan 26, 2009 3:47 pm

Re: How to prevent MSSCCPRJ.SCC from being overwritten?

Post by rda » Mon Mar 08, 2010 2:18 pm

To add the solutions to source I dragged and dropped all the files into Vault, then used the "Source Control->Change Source Control->Bind" option in Visual Studio 2005 to bind all the projects after selecting Vault Classic Client as my source control plugin. Previously these files were in SourceSafe, but I deleted all the legacy files (vssscc, vspscc, etc) before binding from Vault and I manually removed all the source control info from the sln files.

The projects are different in each solution, they just share the same root folder, sort of like this:

C:\Root\Project1.sln
C:\Root\Project2.sln
C:\Root\Project1Files\<various cpp/h files>
C:\Root\Project2Files\<various cpp/h files>

There are actually about 7 *.sln files and probably 50 folders with files in them below that, some with sub-projects (vcproj project files included) and some without, but none of the sub-folders actually have more than one sln or vcproj file in the same folder, which is where I begin to see the problem.

In terms of whether MSSCCPRJ.SCC was generated, first I manually edited the MSSCCPRJ.SCC file, then I let Vault generate it - either way it works fine when the file is writeable but as soon as it's set to read-only it gets overwritten with a single project's info as soon as I open that project's sln file.

rda
Posts: 42
Joined: Mon Jan 26, 2009 3:47 pm

Re: How to prevent MSSCCPRJ.SCC from being overwritten?

Post by rda » Thu Mar 25, 2010 7:58 am

Did anyone ever come up with a solution for this? It's still a problem for us. Right now I'm just asking all my developers to set the MSSCCPRJ.SCC as not read-only when they get latest but it's a workaround, I would like to see a real solution if possible.

Thanks!

Post Reply