Why is TFS ignoring a project in my solution?

2020-05-29 13:24发布

问题:

I have multiple projects in our solution that is in our TFS 2010 repository. I've added about 5 new projects to this solution in recent days.

I have found that for one of the projects, that the project file itself will not check-in to TFS. All of the artifacts contained in this project are working fine; they are checked in and I can see them in the Team Explorer. But I cannot see the project file in Team Explorer, nor is their an icon next to the project in Solution Explorer that would indicate its checked in status.

Also, clicking on any of the TFS related option in the context menu in Visual Studio results in those options being applied to the file contained in the project, not the actual project itself.

Can this be remedied or do I have to create an entirely new project and add all of the artifacts from the old project back into it?

回答1:

Your project doesn't have appropriate Source Control Bindings! With the solution open, you'll need to go to File -> Source Control -> Change Source Control to view the bindings for your projects. The failing one probably will show an "Unknown" or not binded status. You can then use that dialog to correct the binding and check in the project file.

Appended Alternate Solution - Navigate to the Team Explorer -> Source Control and manually add the files using the "Add Items to Folder" menu item.



回答2:

You can try following steps

1 Unbind the project in "Change Source Control" dialog

2 Refresh project to update source control status

3 Right click the project and click Add the Project to source Control in solution explorer



回答3:

I was faced with the same issue but the solution is slightly different than those mentioned so far. My project's contents were checked in but the project itself was not. The project's bindings were valid.

In the Team explorer's Source Code Explorer, the project files were greyed out. After a get-latest, TFS opened the Merge Conflicts screen where I could choose to keep the local copy.

After this, the project was part of TFS.