Visual Source Safe - Projects, Subprojects, files confused with IDE, getting started...

Posted on 2005-05-02
Medium Priority
Last Modified: 2010-04-17
Dang, I knew this was going to happen.  VSS is slowing me down.  I know it will help me in the long run, but right now is painful.

Okay, I have a main project with 20 subprojects.  Each subproject has its own working folder.  Using the VSS help, I established my main project, created the subprojects, and placed each project until control.  VSS would display all of the files to control, I would press okay, we're off and running.  Not so fast...

So, this morning I popped into my IDE (Embedded Visual C++ 4.1, Windows XP Pro), and tried to make some code changes.  The first went as I would expect it: the file was write locked, I said check it out, and off we went.  But, when I went to change another file, it gave me the same error.  This time, the file was flagged as NOT under source control in the IDE although it IS in the VSS subproject.

What?  How did this happen, and how do I fix it?  I'm stuck in a paradox at the moment.

Second question - I'm in the IDE.  There is a file that is NOT checked into VSS (let's say it is a new file).  How the heck to I
specify the sub project?

Frustrated.  Points awarded for speed of correct answer and may be inscreased (living topic).

Question by:charles_gilley
  • 3
  • 2
LVL 12

Expert Comment

ID: 13910344
First question:  You may need to close the group project altogether (save it), then re-open it to see that VSS and the IDE match up.

Second question:  at least using VB6 in the IDE, if you have a new file as part of a project, you can right-click it, then click Check-In.  VSS should default to the container project and allow you to check in the new file into that project in VSS.  Also, in VSS, you can speficy the working folder for any project folder or file.

Hope this helps,

Author Comment

ID: 13910721
As far as the group project showing the correct status - it has been closed and opened numerous times - no joy.
The IDE definitely thinks the file is free...  if I try to check it in, it does not prompt me for any project - it takes the default - which is the root parent project.  I know this to be so, because I added a file just to see what would happen - showed up at the top.  If I tried to move this file into the sub project, VSS refused saying that the file already existed.

So, it sees it but it doesn't see it.

Is it possible to see ..., crud, okay, I just see what happened...

In my development workspace, I have the following organization:
  MainProject  (most source code here)

Sub A->C is flagged as a dependent of the main project.  Each subproject may use classes and header files from the parent project.  If so, I have them linked in as "../NFile.h"  for example.  

When I first captured the projects, I captured the main project first, then I captured each subproject.  The files that are confused are under source control under the subprojects.

Expert Comment

ID: 13911107
There is no connection between files under VS projects and files under VSS.
VSS knows only folders/subfolders/files. File MainProject/SubA/File1.cpp can be part of project SubB (MainProject/SubB) but VSS knows nothing about it.

If file is located in subfolder which is under VSS it doesn't mean that it will be automaticvally added to VSS. You should added it manually !!!
You could also use VSS Explorer for it.

When you are adding file to VSS it's not important what project is default. Because for VSS it's just file ... no more. For Visual Studio file can be part of several projects. But for VSS it's only one simple file.
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.


Author Comment

ID: 13912992
I agree with your comments on file relationships and VSS.  However, silly me, I used the IDE to capture the source code and it appears to have seriously hosed what is what.

My current theory is that when one has subprojects in the IDE, and you perform an initial capture using the parent project, it appears the IDE grabs all of the files each time they are referenced (need to test this further) and parks them according to it's rules.   Depending on the order of things, the files' status becomes quite confused.

Interestingly, all of the files are captured in VSS correctly.  Looks like I need to reword my title.....

Accepted Solution

ag_work earned 1500 total points
ID: 13913959
You will be never confused if you add files/project using right method.
To add project to VSS it is much more better to use VSS Explorer.
This way everything will be correct and clear.
It happens only once usualy so it's not so difficult I think.
You can use VS IDE for all other simple operations like adding one file or check-in/check-out.

Author Comment

ID: 13914042
yeah, silly me... lured into the ally and mugged by Visual Studio :).
Now I just need to go and fix it.  More in a bit.

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
Simple Linear Regression
Starting up a Project

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question