PRB: "File or Project not Found" Adding Files via Integration

Last reviewed: July 22, 1997
Article ID: Q164684
The information in this article applies to:
  • Microsoft Visual SourceSafe, 32-bit, for Windows, version 5.0
  • Microsoft Visual Basic Control Creation, Professional, and Enterprise Editions for Windows, version 5.0
  • Microsoft Visual Basic Standard, Professional, and Enterprise Editions, 16-bit and 32-bit, for Windows, version 4.0
  • Microsoft Visual C++, 32-bit Editions, versions 4.0, 4.0a, 4.1, 4.2, 5.0
  • Microsoft Visual FoxPro for Windows, versions 5.0, 5.0a

SYMPTOMS

When you add a project or a file to SourceSafe from one of the applications that SourceSafe integrates with, you receive the following error message:

   File or Project not Found

CAUSE

The SourceSafe project structure does not match the directory structure on the drive that contains the application project.

RESOLUTION

  1. Create a SourceSafe project structure that mirrors your application
project structure.

-or-

  1. If the error occurs while adding an application project to SourceSafe, turn off project security by unchecking the "Enable Project Security" check box in the Admin program.

STATUS

Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION

To distinguish between the SourceSafe project (for example, $/develop/newproj) and the "project" concept in an integrated application (.PJX in FoxPro, .MDP in Visual C, .VBP in Visual Basic), the latter will be referred to as the "application project." The directory that contains the application project file (PJX, MDP, VBP etc.) is the "home" directory.

When you add an application project to SourceSafe, you are prompted to specify the SourceSafe project that will store your files. We'll call this the "parent" project. The working folder of the parent project is set to the home directory. When you add a file from the application project to SourceSafe, the integration looks at the relative path of that file to the home directory and attempts to add it to a SourceSafe project that has the same relative path to the parent project.

To illustrate this, assume that you have the following directory structure:

   C:
      \develop
          \greatapp
               greatproj.vbp (file)
               \forms
                  greatform.frm

           \badapp
                module3.bas  (file)

The application project greatproj contains the files greatform.frm and module3.bas, and you add greatproj to SourceSafe, in a project named $/apps/greatapp.

In this example, the home directory is c:\develop\greatapp and the parent project is $/apps/greatapp.

Consider how the SourceSafe integration attempts to store the three files.

Greatproj.vbp will be stored in $/apps/greatapp.

Greatform.frm will be stored in $/apps/greatapp/forms.

Note that if the /forms subproject does not exist it should be created on the fly by the integration when you first add greatproj.vbp to SourceSafe. However, if project security is enabled, you will receive the "File or Project not Found" error due to a bug in the integration. Either disable project security prior to adding the application project under SourceSafe, or create the subproject manually and add the missing files.

Module3.bas - The integration will look for a sibling project to $/apps/greatapp named $/apps/badapp. The relative path from greatproj.vbp to module3.bas in the directory structure is "up one level then down one level into badapp". The integration attempts to map this relative path accordingly. If $/apps/badapps does not exist, you will receive the error message. This is correct behavior, the integration only creates subprojects of the parent project.

Take into account that subprojects of the parent are only created by the integration when the application project is first added to SourceSafe. For example, after adding greatproj to SourceSafe you create a new subdirectory:

C:\develop\greatapp\modules, save module4.bas in that subdirectory, and add module4.bas to the application project. When you attempt to add module4.bas to SourceSafe, you will receive the error message because the integration is looking for a subproject:

   $/apps/greatapp/modules.

Again the relative path from greatproj.vbp to module4.bas is "down one

level into modules", and will fail if there is no matching subproject.


Keywords : ssfox ssint ssvb ssvc vcbuglist500
Version : 4.0 4.0a 4.1 5.0 5.0a
Platform : NT WINDOWS
Issue type : kbprb


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: July 22, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.