VS6 and VAULT

This forum is now locked, since Gold Support is no longer offered.

Moderator: SourceGear

Locked
jwebster
Posts: 15
Joined: Fri Jan 06, 2006 12:19 pm
Location: Cincinnati, OHIO

VS6 and VAULT

Post by jwebster » Fri Jan 06, 2006 12:39 pm

We are a new user to this system. I need to take Vault and make it available through Visual Studio 6 so that we can check-in and check-out projects.

I have already selected the "use Vault as the default Source Safe" in the client settings.

Also, we already have all of the files and projects checked into Vault, so I will need to know what to do to check the projects in and out of Vault through Visual Studio 6.

Thanks,

Jim
Jim Webster

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

Post by lbauer » Fri Jan 06, 2006 4:35 pm

In VB, under the Tools menu. You should see "SourceGear Vault."
Select SourceGear Vault->Create Project from SourceGear Vault. You'll be prompted to log in to the Vault server and choose a repository. If the project in already in the Vault repository, click on the folder in the tree that contains the project and Vault will retrieve that project and create the necessary source control bindings.

For additional information about IDE integration see this KB article:
http://support.sourcegear.com/viewtopic.php?t=776

It discusses VS.NET, but the basic principles apply to VB also.
Linda Bauer
SourceGear
Technical Support Manager

jwebster
Posts: 15
Joined: Fri Jan 06, 2006 12:19 pm
Location: Cincinnati, OHIO

Visual Studio

Post by jwebster » Mon Jan 09, 2006 8:57 am

I do not have the option in tools in vb to do anything with Vault. That is the problem. (This is visual studio 6) How do I get this option to appear?
Jim Webster

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

Post by lbauer » Mon Jan 09, 2006 2:18 pm

What specific application of Visual Studio 6 are you using? Vault supports integration with Visual Basic and Visual C++. Are you using one of these?
Linda Bauer
SourceGear
Technical Support Manager

jkp*74
Posts: 147
Joined: Wed Dec 15, 2004 9:42 pm
Contact:

Post by jkp*74 » Fri Jan 13, 2006 1:07 am

I have projects created using VC++ 6 (infact i have 2 projects creating in a Workspace). I also face difficulty to add the solution/workspace into the Vault Server. When i check the server option, *.dsw extension is excluded. What does that means? As mentioned by jwebster, the option you mentioned cannot be found in the VC++ 6 IDE.
Joel
Micro Modular System
http://www.mmsis.com

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

Post by lbauer » Fri Jan 13, 2006 9:03 am

When i check the server option, *.dsw extension is excluded. What does that means? As mentioned by jwebster, the option you mentioned cannot be found in the VC++ 6 IDE.
I could use more information. Are you unable to add a project to source control, or you can't open a project from source control?

What server option are you checking?

It would be helpful if you could provide specific steps to reproduce the problem.
Linda Bauer
SourceGear
Technical Support Manager

jkp*74
Posts: 147
Joined: Wed Dec 15, 2004 9:42 pm
Contact:

Post by jkp*74 » Fri Jan 13, 2006 8:06 pm

It is not the Server Options. :oops: It is Repository Options under Vault Admin Tool. At File Types group -> File Exclusions (ex., *.exe, *.dll): field.
It is not really i can't add the projects into the Vault Server. It is just that i do not know of a correct steps to do that. What i have done was add the Workspace (.dsw) (surprisingly it can be added in) - the dialog box list only one .dsw file, then add the projects (.dsp) - the dialog box also list only one .dsp file and then highlight all the source & header folders to add the files into the vault server. It is too manual for me.
Note: when i first added the project file (.dsp), the dialog box list the dsp file and all the source files. However, when i remove the project from Source Control & then try to add it back again, the dialog box shows only one dsp file.

When other user need to open the same project from a different PC, only one projects appear as under source code. The other project was not under source control. I would suspect it was due to the project was not added properly into the Vault Server in the first place.
Attachments
Add dsw to Source Control.jpg
Add dsw to Source Control
Add dsw to Source Control.jpg (56.22 KiB) Viewed 18616 times
Add Workspace.jpg
Dialog Box list only one dsw file
Add Workspace.jpg (97.43 KiB) Viewed 18617 times
Add dsp to Source Control.jpg
Dialog box shows only one dsp file
Add dsp to Source Control.jpg (74.14 KiB) Viewed 18617 times
Add source file to Source Control.jpg
Hightlight the folders and select the add to solution command. It lists all the source / header files
Add source file to Source Control.jpg (126 KiB) Viewed 18617 times
Joel
Micro Modular System
http://www.mmsis.com

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

Post by lbauer » Mon Jan 16, 2006 5:51 pm

Thanks for the screenshots. I'll try to reproduce this and hopefully provide a solution.
Linda Bauer
SourceGear
Technical Support Manager

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

Post by lbauer » Tue Jan 17, 2006 2:30 pm

Integraton with Visual C++ does seem to take more manual steps than VS.NET, for instance. It helps to set the project up properly so that other users can retrieve them more easily.

Here are the steps I followed to create the project in VC++ as you showed in your screenshots. I created everything new, but you could also probably do this by adding existing projects to a new workspace.

I created a new workspace, WorkspaceTest. Then I created project LibFiles and added it to the current workspace and then created TestProject and added it to the current workspace. (Note: You can configure Visual C++ to prompt you to add project/files to source control when you create them (Tools->Options->Source Control), but I opted to complete the structure first.)

Then I had to add the workspace and the projects to Vault in separate steps. I was unable to find a recursive way to do this. When I added the workspace to source control a WorkspaceTest folder was created, and I added both LibFiles and TestProject to the WorkspaceTest folder in Vault.

The folder structure in Vault is:
WorkspaceTest
|--LibFiles
|--TestProject

This is the same structure on my local drive.

Then I connected to Vault as a different user from a different machine and opened the workspace and project from source control:

In VC++, I did Open workspace and in the bottom of that dialog, chose Open a project from Source Control, which gave a me a login to Vault. In the folder tree, I chose the WorkspaceTest folder and clicked OK, then clicked Open in the Open Workspace dialog. I was prompted to Get latest version of the Libfiles.dsp and Testfiles.dsp files, and the workspace and both projects appeared in VC++.

It's possible that if your user retrieved both projects from source control but only sees one in VC++, they can try highlighting the WorkspaceTest in VC++ and selecting Project->Insert Project in to Workspace.

Another option that can save steps: In Tools->Options->Source Control you can choose to check in all your files when you close the workspace.
Linda Bauer
SourceGear
Technical Support Manager

jkp*74
Posts: 147
Joined: Wed Dec 15, 2004 9:42 pm
Contact:

Post by jkp*74 » Fri Apr 18, 2008 12:42 am

Back to work on earlier projects coded in VC++ using VS6. The files were added in through Vault client & not thorough the IDE. Due to some reason, i do not want to alter the files - so i practically hand coded the binding information:

1) Created the MSSCCPRJ.SCC file manually with the following info:

Code: Select all

SCC = This is a source code control file

[UI.dsw]
SCC_Aux_Path = http://csd-data-server/VaultService|Joel:4
SCC_Project_Name = $/LU-028 - TFTR Machine - #E/Source Code/VC++

[UI.DSP]
SCC_Aux_Path = http://csd-data-server/VaultService|Joel:4
SCC_Project_Name = $/LU-028 - TFTR Machine - #E/Source Code/VC++
2) Add this line in *.dsw file:

Code: Select all

begin source code control
$/LU-028 - TFTR Machine - #E/Source Code/VC++
.
3) Add this line in *.dsp file:

Code: Select all

# PROP Scc_ProjName "$/LU-028 - TFTR Machine - #E/Source Code/VC++"
# PROP Scc_LocalPath "."


Everything works OK but i am baffled by each time when i start VS6 & load the workspace, it always prompt me for the repository selection. (i have checked the rep id & #4 is correct). Subsequently when i close the worksplace (without exiting VS6) & reload again, it never prompt me again. It only prompt when i first start VS6.

I just wonder if there is any way to stop this prompting.

BTW, if i follow the correct way to add project into Source Control & retrieve it, this observation never happen.
Joel
Micro Modular System
http://www.mmsis.com

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

Post by lbauer » Fri Apr 18, 2008 12:38 pm

I'm not sure why it would work differently. There may be a minor error in the hand coding.

Try doing a test project the "incorrect" way and do another the "corrrect' way and diff the files to see if there are minor omissions or errors.
Linda Bauer
SourceGear
Technical Support Manager

jkp*74
Posts: 147
Joined: Wed Dec 15, 2004 9:42 pm
Contact:

Post by jkp*74 » Sun Apr 20, 2008 9:33 pm

I have done that. Nothing unusual. Is MSSCCPRJ.SCC the only file responsible for the login & repository lookup?
Joel
Micro Modular System
http://www.mmsis.com

jkp*74
Posts: 147
Joined: Wed Dec 15, 2004 9:42 pm
Contact:

Post by jkp*74 » Sun Apr 20, 2008 9:55 pm

Deleting *.opt file causes the same observation on the "Test" project (this was added correctly into Vault Server). So, i guess that's where the problem is - i have deleted the *.opt file in the working project - thinking that it can be re-generated.
Joel
Micro Modular System
http://www.mmsis.com

jkp*74
Posts: 147
Joined: Wed Dec 15, 2004 9:42 pm
Contact:

Post by jkp*74 » Sun Apr 20, 2008 10:10 pm

Reopen again the workspace from Source Control solve my problem. After that, don't delete *.opt file.
Joel
Micro Modular System
http://www.mmsis.com

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

Post by lbauer » Mon Apr 21, 2008 7:19 am

Thanks for the update. This will be of help to other C++ users.
Linda Bauer
SourceGear
Technical Support Manager

Locked