Adding a new project to an existing solution in TF

2019-01-30 16:57发布

I added a project to an existing solution that is currently under source control using TFS, but for some reason I cannot check in the new project. When I view my pending changes, none of the files in the new project show up. None of the files have a plus (for a new file) next to them. What did I do wrong? How do I fix it? It's time to check in.

8条回答
孤傲高冷的网名
2楼-- · 2019-01-30 17:55

The problem is the solution has lost its binding. That's why it's not checking out automatically when you add the new project.

In order to restore the binding in VS 2010, go to File->Source Control->Change Source Control. Look for the "Solution: your solution name" and if it's not bound it will say "no server". Click on it and then click "Bind" from the toolbar.

in Visual Studio 2012/2013 it's File->Source Control->Advanced->Change Source Control (Thanks to danglund).

This should create a new vssscc file that is correctly bound. Now add the new project and everything should work correctly.

查看更多
Fickle 薄情
3楼-- · 2019-01-30 17:59

Unfortunately, I'd wager that your best bet is to manually do the check-ins through the command line. I've ran into situations where the Team Explorer UI grows out of sync with what's actually happening in source control, and manually fixing things through tf.exe was the only way to resolve it.

That said, normally, adding a new project to a solution isn't a hassle.

查看更多
登录 后发表回答