Project not showing as checked-in to TFS in Visual

2019-01-25 04:33发布

I added a new project to a Solution Folder in VS2013. I added the project to TFS via Source Control Explorer but in VS Solution Explorer the little lock icon next to the project is not displayed. I just downloaded the solution to a new computer, and that project did not get downloaded. I had to go into Source Control Explorer and explicitly get it. The solution just does not recognize it as under source control...

How do I correct this?

Any help is appreciated

3条回答
一纸荒年 Trace。
2楼-- · 2019-01-25 04:54

If the Projects/Folders are missing in Source Control this can be done -

Open TFS -> Source Control Explorer -> Right click on Solution folder and click 'Add Items to Folder...'. Now in 'Add to source Control' prompt select the folder of desired project that needs to be added to source control. On doing so the project folder along with its content should appear with + sign and on check-in the project will be available under the solution in source control.

查看更多
闹够了就滚
3楼-- · 2019-01-25 05:11

Looking back to basics, I discovered some of the files (such as the project file itself) had never been added to source control. I discovered this by going to Source Control Explorer, selecting one of the projects unmarked in Solution Explorer, right-clicking to get the context menu, then selecting Add Files To Source Control, then selecting the whole list presented, then clicking OK/NEXT/FINISH. That marked the unmarked project in Solution Explorer with a plus sign (+) to be added. Then again from Source Control Explorer I selected the solution and clicked Check In Pending Changes. Then I got the lock icon in Solution Explorer.

查看更多
劫难
4楼-- · 2019-01-25 05:13

You probably need to bind the project to source control.

  • Open the project in Visual Studio.
  • File > Source Control > Advanced > Change Source Control (or you might find there is only an option like File > Source Control > Add to Source Control - I can't remember exactly what this looks like)
  • If you get to the Change Source Control dialog, then select all the projects in the list and click Bind. If this works you should have a tick in the "Connected" column and "Valid" status, and you can OK the dialog and your project should be good to go. If binding fails, then Unbind everything and try binding again.
查看更多
登录 后发表回答