Unable to add an existing file to a project

R

rohinichandrap

Hi,

I have converted a workspace(A.dsw) from VC++ 6.0 to VC++ 7.1(A.sln).
The solution A.sln has three projects in it B,C,D.

My software configuration management is done in Rational clear case.

Below is the hierarchy in my clearcase explorer.

|
|----jkl
|
|----abc
|---------abc_source
|---source files
|---header files
|---------abc_proj(*.vcproj,A.sln,*.vcproj.vspscc,..)


When I tried to add an existing source file to one of the projects I
got this following message box.

Some of the files you are adding to your project are located outside
the project's binding root.
These files cannot be source controlled unless they are moved.

In the soultion explorer in my IDE ,when I tried to add one of the
files from the folder abc_source\source files to any of the projects
source files folder in the solution, I got the above message.

When I pressed OK nothing happened and the file did not get added to
the project.


Could anyone please help me in this regard.

Thanks&Regards,
Rohini Chandra
 
C

Carl Daniel [VC++ MVP]

Hi,

I have converted a workspace(A.dsw) from VC++ 6.0 to VC++ 7.1(A.sln).
The solution A.sln has three projects in it B,C,D.

My software configuration management is done in Rational clear case.

Below is the hierarchy in my clearcase explorer.

|
|----jkl
|
|----abc
|---------abc_source
|---source files
|---header files
|---------abc_proj(*.vcproj,A.sln,*.vcproj.vspscc,..)


When I tried to add an existing source file to one of the projects I
got this following message box.

Some of the files you are adding to your project are located outside
the project's binding root.
These files cannot be source controlled unless they are moved.

In the soultion explorer in my IDE ,when I tried to add one of the
files from the folder abc_source\source files to any of the projects
source files folder in the solution, I got the above message.

When I pressed OK nothing happened and the file did not get added to
the project.


Could anyone please help me in this regard.

While I can't promise you a solution, I can tell you what the message means,
and what you might try to resolve it.

The "binding root" for the project and solution is /abc/abc_proj, while the
source files are in /abc/abc_source - that former not being a prefix of the
latter.

What you need to do is bind the solution at a higher level in the source
control hierarchy, so the binding root of the project and solution are both
/abc.

In theory, all you should need to do is unbind the project from
source-control, and then re-bind the solution to the /abc level in the
source control repository. I say in theory because my experience has been
that in practice, it's often frustrating/difficult/impossible to get VS to
set the binding root the way you intended.

-cd
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top