470,864 Members | 2,010 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,864 developers. It's quick & easy.

Unable to add an existing file to a project

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

Jun 21 '06 #1
1 1795
<ro************@gmail.com> wrote in message
news:11**********************@m73g2000cwd.googlegr oups.com...
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
Jun 21 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by sreedhar | last post: by
3 posts views Thread by alan_coffman2004 | last post: by
1 post views Thread by Carl | last post: by
7 posts views Thread by Jed | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.