Microsoft KB Archive/164684: Difference between revisions

From BetaArchive Wiki
m (Text replacement - ">" to ">")
m (Text replacement - """ to """)
 
Line 94: Line 94:
== MORE INFORMATION ==
== MORE INFORMATION ==


To distinguish between the Visual SourceSafe project (for example, $/develop/newproj) and the &quot;project&quot; concept in an integrated application (that is, .pjx in Visual FoxPro, .mdp in Visual C++, .vbp in Visual Basic), the &quot;project concept&quot; is referred to as the &quot;application project&quot; in this article. The directory that contains the application project file (that is, .pjx, .mdp, .vbp, and so forth) is the &quot;home&quot; directory.<br />
To distinguish between the Visual SourceSafe project (for example, $/develop/newproj) and the "project" concept in an integrated application (that is, .pjx in Visual FoxPro, .mdp in Visual C++, .vbp in Visual Basic), the "project concept" is referred to as the "application project" in this article. The directory that contains the application project file (that is, .pjx, .mdp, .vbp, and so forth) is the "home" directory.<br />
<br />
<br />
When you add an application project to Visual SourceSafe, you are prompted to specify the Visual SourceSafe project where you want to store your files. This is referred to as the &quot;parent&quot; project. The working folder of the parent project is set to the home directory. When you add a file from the application project to Visual SourceSafe, the integration looks at the relative path of that file to the home directory and attempts to add it to a Visual SourceSafe project that has the same relative path to the parent project.<br />
When you add an application project to Visual SourceSafe, you are prompted to specify the Visual SourceSafe project where you want to store your files. This is referred to as 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 Visual SourceSafe, the integration looks at the relative path of that file to the home directory and attempts to add it to a Visual SourceSafe project that has the same relative path to the parent project.<br />
<br />
<br />
To illustrate this, assume that you have the following directory structure:
To illustrate this, assume that you have the following directory structure:
Line 119: Line 119:
Greatform.frm is stored in $/Apps/Greatapp/Forms.<br />
Greatform.frm is stored in $/Apps/Greatapp/Forms.<br />
<br />
<br />
'''NOTE''': If the /Forms subproject does not exist, it should be created programmatically by the integration when you first add Greatproj.vbp to Visual SourceSafe. However, if project security is enabled, you will receive the &quot;File or Project not Found&quot; error due to a bug in the integration. Either disable project security prior to adding the application project under Visual SourceSafe, or create the subproject manually and add the missing files. Module3.bas - The integration looks for a sibling project to $/Apps/Greatapp named $/Apps/Badapp. The relative path from Greatproj.vbp to Module3.bas in the directory structure is &quot;up one level then down one level into badapp.&quot; The integration attempts to map this relative path accordingly. If $/Apps/Badapps does not exist, the error message appears. This is correct behavior because the integration only creates subprojects of the parent project.<br />
'''NOTE''': If the /Forms subproject does not exist, it should be created programmatically by the integration when you first add Greatproj.vbp to Visual 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 Visual SourceSafe, or create the subproject manually and add the missing files. Module3.bas - The integration looks 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, the error message appears. This is correct behavior because the integration only creates subprojects of the parent project.<br />
<br />
<br />
Take into account that subprojects of the parent are only created by the integration when the application project is first added to Visual SourceSafe. For example, after adding Greatproj to Visual 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 Visual SourceSafe, the error message appears because the integration is looking for the following subproject:
Take into account that subprojects of the parent are only created by the integration when the application project is first added to Visual SourceSafe. For example, after adding Greatproj to Visual 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 Visual SourceSafe, the error message appears because the integration is looking for the following subproject:
<pre class="codesample">  $/Apps/Greatapp/Modules.
<pre class="codesample">  $/Apps/Greatapp/Modules.
                 </pre>
                 </pre>
Again the relative path from Greatproj.vbp to Module4.bas is &quot;down one level into modules&quot;, and fails if there is no matching subproject.
Again the relative path from Greatproj.vbp to Module4.bas is "down one level into modules", and fails if there is no matching subproject.


</div>
</div>

Latest revision as of 11:01, 21 July 2020

Knowledge Base


Article ID: 164684

Article Last Modified on 7/16/2004



APPLIES TO

  • Microsoft Visual SourceSafe 5.0 Standard Edition
  • Microsoft Visual Basic 5.0 Control Creation Edition
  • Microsoft Visual Basic 5.0 Professional Edition
  • Microsoft Visual Basic 5.0 Enterprise Edition
  • Microsoft Visual Basic 4.0 Standard Edition
  • Microsoft Visual Basic 4.0 Professional Edition
  • Microsoft Visual Basic 4.0 Professional Edition
  • Microsoft Visual Basic 4.0 16-bit Enterprise Edition
  • Microsoft Visual Basic 4.0 32-Bit Enterprise Edition
  • Microsoft Visual C++ 4.0 Standard Edition
  • Microsoft Visual C++ 4.0 Standard Edition
  • Microsoft Visual C++ 4.1 Subscription
  • Microsoft Visual C++ 4.2 Enterprise Edition
  • Microsoft Visual C++ 5.0 Enterprise Edition
  • Microsoft Visual C++ 4.2 Professional Edition
  • Microsoft Visual C++ 5.0 Professional Edition
  • Microsoft Visual FoxPro 5.0 Standard Edition
  • Microsoft Visual FoxPro 5.0a



This article was previously published under Q164684

SYMPTOMS

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

File <filename> could not be mapped to the SourceSafe project <projectname>

CAUSE

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

RESOLUTION

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

STATUS

Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. This problem was corrected in Visual SourceSafe version 6.0 for Windows.

MORE INFORMATION

To distinguish between the Visual SourceSafe project (for example, $/develop/newproj) and the "project" concept in an integrated application (that is, .pjx in Visual FoxPro, .mdp in Visual C++, .vbp in Visual Basic), the "project concept" is referred to as the "application project" in this article. The directory that contains the application project file (that is, .pjx, .mdp, .vbp, and so forth) is the "home" directory.

When you add an application project to Visual SourceSafe, you are prompted to specify the Visual SourceSafe project where you want to store your files. This is referred to as 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 Visual SourceSafe, the integration looks at the relative path of that file to the home directory and attempts to add it to a Visual 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. You add Greatproj to Visual 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 Visual SourceSafe integration attempts to store the three files.

Greatproj.vbp is stored in $/Apps/Greatapp.

Greatform.frm is stored in $/Apps/Greatapp/Forms.

NOTE: If the /Forms subproject does not exist, it should be created programmatically by the integration when you first add Greatproj.vbp to Visual 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 Visual SourceSafe, or create the subproject manually and add the missing files. Module3.bas - The integration looks 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, the error message appears. This is correct behavior because 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 Visual SourceSafe. For example, after adding Greatproj to Visual 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 Visual SourceSafe, the error message appears because the integration is looking for the following subproject:

   $/Apps/Greatapp/Modules.
                

Again the relative path from Greatproj.vbp to Module4.bas is "down one level into modules", and fails if there is no matching subproject.

Keywords: kbprb KB164684