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

Posted on 2005-05-02
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
    LVL 12

    Expert Comment

    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

    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

    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.

    Author Comment

    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

    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

    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

    Courses: Start Training Online With Pros, Today

    Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

    Join & Write a Comment

    Suggested Solutions

    Purpose To explain how to place a textual stamp on a PDF document.  This is commonly referred to as an annotation, or possibly a watermark, but a watermark is generally different in that it is somewhat translucent.  Watermark’s may be text or graph…
    Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
    In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
    In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

    755 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

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now