Microsoft KB Archive/195836

= PRB: Visual C++ Integration: "Specify Working Directory" Dialog =

Article ID: 195836

Article Last Modified on 6/18/2001

-

APPLIES TO


 * Microsoft Visual SourceSafe 6.0 Standard Edition
 * Microsoft Visual C++ 6.0 Enterprise Edition

-



This article was previously published under Q195836



SYMPTOMS
When you add a project to Visual SourceSafe in the Visual C++ integrated development environment a dialog box appears that prompts you to specify a working directory.



CAUSE
The Visual C++ project contains a file that is not in the Visual C++ project directory (the directory containing the .dsp file) or a subdirectory underneath it.



RESOLUTION
To work around this problem, do one of the following:


 * Keep all files in the Visual C++ project either in the project directory or in a subdirectory underneath it.
 * Create a project structure in Visual SourceSafe that mirrors the directory structure on your hard drive before adding the Visual C++ project to Visual SourceSafe. In this situation, the Specify Working Directory dialog box appears, but the second dialog box described in the MORE INFORMATION section below does not appear.



STATUS
This behavior is by design.



MORE INFORMATION
By default, the Specify Working Directory dialog box suggests the Visual C++ project directory. After you click OK and choose to add all files in the Visual C++ project to Visual SourceSafe, another dialog box appears with the following message:

File could not be mapped to the SourceSafe project

Copy the file to  ?

You only have the option of copying the file to the Visual C++ project directory, which may not be the desired location if the Visual C++ project has a subdirectory structure with different subdirectories for source files, header files, and so forth. In this case, you need to copy or move the files into the appropriate directories using Windows Explorer and then add them to the Visual C++ project.

The relative path in Visual C++ is listed in the "Persist as" field on the General tab of the Source File Properties dialog box. This is the path that Visual SourceSafe attempts to resolve relative to the .dsp file in its database.

Steps to Reproduce Behavior
  Create a directory structure similar to the following:      C:\ projects\ dsphome\ dspother\  Create a file (for example, file1.cpp) in the dspother subdirectory. In Visual C++, create a project (for example, proj1.dsp) in the dsphome subdirectory. In the Visual C++ File View, add file1.cpp from step 2 to the .dsp.</li> Add the .dsp to Visual SourceSafe, and create a new project to store the .dsp.</li></ol>

RESULT: The Specify Working Directory dialog box appears.

<div class="references_section">