dfsafdfsdf

I created a new Team Project and configured source control in Visual Studio Team Suite to use the TFS plug-in for source control. I then added an empty Visual Studio solution to source control from within Visual Studio. No problem. It shows under source control and I can check it in and out. I have a number of existing projects that I want to move into this new structure. So I copied an existing project folder -- putting the project folder in the local solution folder and then right-clicked on the solution and chose Add Existing Project. It did indeed add the existing project to the solution, but it is not in source control; there is no symbol next to the project or its files, ie. the yellow plus like there is for new projects.

Note that I can create a NEW project under the solution and it does get added to source control. The new project is also one level down in my workspace folder.

Please let me know what I am doing wrong. Thanks for any help in advance.



Re: Team Foundation Server - Version Control Cannot add project with changed path to source control

Ben Ryan - MSFT

I am unable to reproduce this behavior on VS 2005. When I add the existing project I see adds pended for its files. Is there any chance the project you copied was bound to source control at its old location If you bring up File->Source Control->Change Source Control does it show the project as unbound or bound and invalid If you rebind the project does it work OK

Thanks,

Ben Ryan






Re: Team Foundation Server - Version Control Cannot add project with changed path to source control

Richard Berg MSFT

One more question: was the project mapped in your workspace when you tried to add it Is it now We should add a mapping when necessary to bring it under source control, but that step may have failed for some reason.




Re: Team Foundation Server - Version Control Cannot add project with changed path to source control

Rui Dias VD

Hi there!

I can reproduce what you writed.

What I did to solve this was add the project folder to source control in Source Control Explorer.

This way I get my project under source control. However, you're right! The icons on Solution explorer only work on files and not in folders.

Hope this helps.





Re: Team Foundation Server - Version Control Cannot add project with changed path to source control

Hua Chen - MSFT

Hello Rui:

Do you add an empty folder in the solution explorer

There is a known issue about empty folders in the solution explorer.






Re: Team Foundation Server - Version Control Cannot add project with changed path to source control

Rui Dias VD

Hello Hua.

Nop! In fact I've added a folder recursively.

These are the steps:

I've created a database project under my ...\Visual Studio 2005\Projects\<Solution1 Folder>\<Project Folder>

After that created a blank solution under ...\TFSMirror\<Solution2 Folder> added to source control

Copied <Project Folder> under <Solution2 Folder>

Right clicked Solution2 and added Project to solution. (Nothing happened here. Mabe it should add automaticaly to source control)

After this, I went to Source Control Explorer and added the Project folder to source control recursively.

All worked fine (files went under source control), but in solution explorer, only files gained a source control icon. Folders don't hve icons stating their state.

Hope being helpful,

Rui Dias





Re: Team Foundation Server - Version Control Cannot add project with changed path to source control

Hua Chen - MSFT

Hello Rui:

Thank you for the detail steps.

I will try it.






Re: Team Foundation Server - Version Control Cannot add project with changed path to source control

Ben Ryan - MSFT

Rui,

When you added the blank solution to source control did you use "Add Solution to Source Control" from the Solution Explorer context menu (or File->Source Control menu), or did you add it to source control using Source Control Explorer or the command line. If you used "Add Solution to Source Control", then adding the existing DB project should have performed SCC pending add operations for that project. If you did not use "Add Solution to Source Control" the the solution is not bound to source control (even though it is in source control). In this case, you would use File->Source Control->Change Source Control to bind the solution to SCC. Once the solution is bound to SCC, adding new projects should to the solution should case SCC pending adds for the projects' files.

Thanks,
Ben Ryan






Re: Team Foundation Server - Version Control Cannot add project with changed path to source control

dfsafdfsdf

Thanks for all your comments on this.

I have found a way to replicate the problem easily. Its probably just me not understanding what is going on under the covers but here it is anyway.

1) I Right click on a Solution folder within my source controlled solution, and 'Add new project'

2) I Select the local workspace folder to put it in, namely /ClassLibraries/TestLib

3) I Check it into source control, then discover that the add process has created its own folder like so, /ClassLibraries/TestLib/TestLib

4) I want to correct the extra folder so I Remove the project from the Solution

5) I relocate the project to the desired directory in my workspace in Windows Explorer

6) I then reinsert it into the solution with Right click on solution folder -> Add existing project, from its new location

7) The added project in its new workspace location has no icons in Solution Explorer indicating source control.

I was able to solve it by simply adding the files manually through Source Control Explorer as Rui Dias suggested.

It makes sense really but at the time I did not know you could add arbitrary files like this.

Thanks again for your help folks.