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条回答
一纸荒年 Trace。
2楼-- · 2019-01-30 17:38

I was also having the same problem, this is how I fixed it:

Go to Visual Studion: File->Source Control->Change Source Control Find your project there, its status would be "Invalid", Click on it and press "Unbind". Now go back to Solution Explorer and Remove your project. Add this project again into the solution explorer solve the problem.

Good Luck!

查看更多
老娘就宠你
3楼-- · 2019-01-30 17:39
  1. Click on the Team Project name in Source Control Explorer
  2. File -> Source Control -> Add Items to Folder...
  3. Follow the wizard.
查看更多
我命由我不由天
4楼-- · 2019-01-30 17:42
  • Make sure you get the latest version of the solution
  • Check out the solution file
  • Add the new project

If the newly added project was previously under (another) source control, that might mess things up, make sure to "unbind" it before adding it. (See source control bindings somewhere under the "file" menu in Visual Studio)

You shouldn't need the command line.

查看更多
别忘想泡老子
5楼-- · 2019-01-30 17:44

TFS can simply do not know about your project existed. Just add your project files through Source Control Explorer and re-load the solution.

While loading of a solution it can ask you to bind your project to source control. Let it do so by clicking Bind button - it should do all the magic for you.

查看更多
SAY GOODBYE
6楼-- · 2019-01-30 17:46

Head over to Source Control Explorer and browse to the place in the tree which matches where the new project is at for your solution. Add the files there.

However, I'd be concerned that you modified the solution file and it didn't ask you to check that out. What you may want to try doing is manually checking out the solution file, then readding the project to the solution and seeing if it takes then.

You shouldn't need to drop to the command line - this is a pretty straightforward operation.

查看更多
再贱就再见
7楼-- · 2019-01-30 17:54

Open the solution. Select the project (make sure it is in the solution).

File -> Source Control -> Properties will bring up the binding dialog.

Bind the project to source control.

You should now see + signs next to all your files. The key is that that a .vssscc is added for your project to version control.

If that fails, open your csproj in notepad (after making a backup), and ensure any version control bindings are removed, then try again.

查看更多
登录 后发表回答